Header And Logo

PostgreSQL
| The world's most advanced open source database.

sqlca.h

Go to the documentation of this file.
00001 #ifndef POSTGRES_SQLCA_H
00002 #define POSTGRES_SQLCA_H
00003 
00004 #ifndef PGDLLIMPORT
00005 #if  defined(WIN32) || defined(__CYGWIN__)
00006 #define PGDLLIMPORT __declspec (dllimport)
00007 #else
00008 #define PGDLLIMPORT
00009 #endif   /* __CYGWIN__ */
00010 #endif   /* PGDLLIMPORT */
00011 
00012 #define SQLERRMC_LEN    150
00013 
00014 #ifdef __cplusplus
00015 extern      "C"
00016 {
00017 #endif
00018 
00019 struct sqlca_t
00020 {
00021     char        sqlcaid[8];
00022     long        sqlabc;
00023     long        sqlcode;
00024     struct
00025     {
00026         int         sqlerrml;
00027         char        sqlerrmc[SQLERRMC_LEN];
00028     }           sqlerrm;
00029     char        sqlerrp[8];
00030     long        sqlerrd[6];
00031     /* Element 0: empty                     */
00032     /* 1: OID of processed tuple if applicable          */
00033     /* 2: number of rows processed              */
00034     /* after an INSERT, UPDATE or               */
00035     /* DELETE statement                 */
00036     /* 3: empty                     */
00037     /* 4: empty                     */
00038     /* 5: empty                     */
00039     char        sqlwarn[8];
00040     /* Element 0: set to 'W' if at least one other is 'W'   */
00041     /* 1: if 'W' at least one character string      */
00042     /* value was truncated when it was          */
00043     /* stored into a host variable.             */
00044 
00045     /*
00046      * 2: if 'W' a (hopefully) non-fatal notice occurred
00047      */ /* 3: empty */
00048     /* 4: empty                     */
00049     /* 5: empty                     */
00050     /* 6: empty                     */
00051     /* 7: empty                     */
00052 
00053     char        sqlstate[5];
00054 };
00055 
00056 struct sqlca_t *ECPGget_sqlca(void);
00057 
00058 #ifndef POSTGRES_ECPG_INTERNAL
00059 #define sqlca (*ECPGget_sqlca())
00060 #endif
00061 
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065 
00066 #endif