Header And Logo

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

ecpgerrno.h

Go to the documentation of this file.
00001 /* src/interfaces/ecpg/include/ecpgerrno.h */
00002 
00003 #ifndef _ECPG_ERRNO_H
00004 #define _ECPG_ERRNO_H
00005 
00006 #include <errno.h>
00007 
00008 /* This is a list of all error codes the embedded SQL program can return */
00009 #define ECPG_NO_ERROR       0
00010 #define ECPG_NOT_FOUND      100
00011 
00012 /* system error codes returned by ecpglib get the correct number,
00013  * but are made negative
00014  */
00015 #define ECPG_OUT_OF_MEMORY  -ENOMEM
00016 
00017 /* first we have a set of ecpg messages, they start at 200 */
00018 #define ECPG_UNSUPPORTED        -200
00019 #define ECPG_TOO_MANY_ARGUMENTS     -201
00020 #define ECPG_TOO_FEW_ARGUMENTS      -202
00021 #define ECPG_TOO_MANY_MATCHES       -203
00022 #define ECPG_INT_FORMAT         -204
00023 #define ECPG_UINT_FORMAT        -205
00024 #define ECPG_FLOAT_FORMAT       -206
00025 #define ECPG_NUMERIC_FORMAT     -207
00026 #define ECPG_INTERVAL_FORMAT        -208
00027 #define ECPG_DATE_FORMAT        -209
00028 #define ECPG_TIMESTAMP_FORMAT       -210
00029 #define ECPG_CONVERT_BOOL       -211
00030 #define ECPG_EMPTY          -212
00031 #define ECPG_MISSING_INDICATOR      -213
00032 #define ECPG_NO_ARRAY           -214
00033 #define ECPG_DATA_NOT_ARRAY     -215
00034 #define ECPG_ARRAY_INSERT       -216
00035 
00036 #define ECPG_NO_CONN            -220
00037 #define ECPG_NOT_CONN           -221
00038 
00039 #define ECPG_INVALID_STMT       -230
00040 
00041 /* dynamic SQL related */
00042 #define ECPG_UNKNOWN_DESCRIPTOR     -240
00043 #define ECPG_INVALID_DESCRIPTOR_INDEX   -241
00044 #define ECPG_UNKNOWN_DESCRIPTOR_ITEM    -242
00045 #define ECPG_VAR_NOT_NUMERIC        -243
00046 #define ECPG_VAR_NOT_CHAR       -244
00047 
00048 /* finally the backend error messages, they start at 400 */
00049 #define ECPG_PGSQL          -400
00050 #define ECPG_TRANS          -401
00051 #define ECPG_CONNECT            -402
00052 #define ECPG_DUPLICATE_KEY      -403
00053 #define ECPG_SUBSELECT_NOT_ONE      -404
00054 
00055 /* for compatibility we define some different error codes for the same error
00056  * if adding a new one make sure to not double define it */
00057 #define ECPG_INFORMIX_DUPLICATE_KEY -239
00058 #define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
00059 
00060 /* backend WARNINGs, starting at 600 */
00061 #define ECPG_WARNING_UNRECOGNIZED      -600
00062  /* WARNING:  (transaction aborted): queries ignored until END */
00063 
00064  /*
00065   * WARNING:  current transaction is aborted, queries ignored until end of
00066   * transaction block
00067   */
00068 #define ECPG_WARNING_QUERY_IGNORED     -601
00069  /* WARNING:  PerformPortalClose: portal "*" not found */
00070 #define ECPG_WARNING_UNKNOWN_PORTAL    -602
00071  /* WARNING:  BEGIN: already a transaction in progress */
00072 #define ECPG_WARNING_IN_TRANSACTION    -603
00073  /* WARNING:  AbortTransaction and not in in-progress state */
00074  /* WARNING:  COMMIT: no transaction in progress */
00075 #define ECPG_WARNING_NO_TRANSACTION    -604
00076  /* WARNING:  BlankPortalAssignName: portal * already exists */
00077 #define ECPG_WARNING_PORTAL_EXISTS     -605
00078 
00079 #endif   /* !_ECPG_ERRNO_H */