Debian Codegraph @

src/interfaces/ecpg/include/ecpgerrno.h

raw
1 /* src/interfaces/ecpg/include/ecpgerrno.h */
2
3 #ifndef _ECPG_ERRNO_H
4 #define _ECPG_ERRNO_H
5
6 #include <errno.h>
7
8 /* This is a list of all error codes the embedded SQL program can return */
9 #define ECPG_NO_ERROR 0
10 #define ECPG_NOT_FOUND 100
11
12 /* system error codes returned by ecpglib get the correct number,
13 * but are made negative
14 */
15 #define ECPG_OUT_OF_MEMORY -ENOMEM
16
17 /* first we have a set of ecpg messages, they start at 200 */
18 #define ECPG_UNSUPPORTED -200
19 #define ECPG_TOO_MANY_ARGUMENTS -201
20 #define ECPG_TOO_FEW_ARGUMENTS -202
21 #define ECPG_TOO_MANY_MATCHES -203
22 #define ECPG_INT_FORMAT -204
23 #define ECPG_UINT_FORMAT -205
24 #define ECPG_FLOAT_FORMAT -206
25 #define ECPG_NUMERIC_FORMAT -207
26 #define ECPG_INTERVAL_FORMAT -208
27 #define ECPG_DATE_FORMAT -209
28 #define ECPG_TIMESTAMP_FORMAT -210
29 #define ECPG_CONVERT_BOOL -211
30 #define ECPG_EMPTY -212
31 #define ECPG_MISSING_INDICATOR -213
32 #define ECPG_NO_ARRAY -214
33 #define ECPG_DATA_NOT_ARRAY -215
34 #define ECPG_ARRAY_INSERT -216
35 #define ECPG_BYTEA_FORMAT -217
36
37 #define ECPG_NO_CONN -220
38 #define ECPG_NOT_CONN -221
39
40 #define ECPG_INVALID_STMT -230
41
42 /* dynamic SQL related */
43 #define ECPG_UNKNOWN_DESCRIPTOR -240
44 #define ECPG_INVALID_DESCRIPTOR_INDEX -241
45 #define ECPG_UNKNOWN_DESCRIPTOR_ITEM -242
46 #define ECPG_VAR_NOT_NUMERIC -243
47 #define ECPG_VAR_NOT_CHAR -244
48
49 /* finally the backend error messages, they start at 400 */
50 #define ECPG_PGSQL -400
51 #define ECPG_TRANS -401
52 #define ECPG_CONNECT -402
53 #define ECPG_DUPLICATE_KEY -403
54 #define ECPG_SUBSELECT_NOT_ONE -404
55
56 /* for compatibility we define some different error codes for the same error
57 * if adding a new one make sure to not double define it */
58 #define ECPG_INFORMIX_DUPLICATE_KEY -239
59 #define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
60
61 /* backend WARNINGs, starting at 600 */
62 #define ECPG_WARNING_UNRECOGNIZED -600
63 /* WARNING: (transaction aborted): queries ignored until END */
64
65 /*
66 * WARNING: current transaction is aborted, queries ignored until end of
67 * transaction block
68 */
69 #define ECPG_WARNING_QUERY_IGNORED -601
70 /* WARNING: PerformPortalClose: portal "*" not found */
71 #define ECPG_WARNING_UNKNOWN_PORTAL -602
72 /* WARNING: BEGIN: already a transaction in progress */
73 #define ECPG_WARNING_IN_TRANSACTION -603
74 /* WARNING: AbortTransaction and not in in-progress state */
75 /* WARNING: COMMIT: no transaction in progress */
76 #define ECPG_WARNING_NO_TRANSACTION -604
77 /* WARNING: BlankPortalAssignName: portal * already exists */
78 #define ECPG_WARNING_PORTAL_EXISTS -605
79
80 #endif /* !_ECPG_ERRNO_H */