PostgreSQL Source Code: src/interfaces/ecpg/include/ecpgerrno.h Source File

PostgreSQL Source Code git master
ecpgerrno.h
Go to the documentation of this file.
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
36 #define ECPG_NO_CONN -220
37 #define ECPG_NOT_CONN -221
38
39 #define ECPG_INVALID_STMT -230
40
41/* dynamic SQL related */
42 #define ECPG_UNKNOWN_DESCRIPTOR -240
43 #define ECPG_INVALID_DESCRIPTOR_INDEX -241
44 #define ECPG_UNKNOWN_DESCRIPTOR_ITEM -242
45 #define ECPG_VAR_NOT_NUMERIC -243
46 #define ECPG_VAR_NOT_CHAR -244
47
48/* finally the backend error messages, they start at 400 */
49 #define ECPG_PGSQL -400
50 #define ECPG_TRANS -401
51 #define ECPG_CONNECT -402
52 #define ECPG_DUPLICATE_KEY -403
53 #define ECPG_SUBSELECT_NOT_ONE -404
54
55/* for compatibility we define some different error codes for the same error
56 * if adding a new one make sure to not double define it */
57 #define ECPG_INFORMIX_DUPLICATE_KEY -239
58 #define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
59
60/* backend WARNINGs, starting at 600 */
61 #define ECPG_WARNING_UNRECOGNIZED -600
62 /* WARNING: (transaction aborted): queries ignored until END */
63
64 /*
65 * WARNING: current transaction is aborted, queries ignored until end of
66 * transaction block
67 */
68 #define ECPG_WARNING_QUERY_IGNORED -601
69 /* WARNING: PerformPortalClose: portal "*" not found */
70 #define ECPG_WARNING_UNKNOWN_PORTAL -602
71 /* WARNING: BEGIN: already a transaction in progress */
72 #define ECPG_WARNING_IN_TRANSACTION -603
73 /* WARNING: AbortTransaction and not in in-progress state */
74 /* WARNING: COMMIT: no transaction in progress */
75 #define ECPG_WARNING_NO_TRANSACTION -604
76 /* WARNING: BlankPortalAssignName: portal * already exists */
77 #define ECPG_WARNING_PORTAL_EXISTS -605
78
79#endif /* !_ECPG_ERRNO_H */

AltStyle によって変換されたページ (->オリジナル) /