1-
21/* File: connection.h
32 *
43 * Description: See "connection.c"
@@ -38,41 +37,41 @@ typedef enum
3837} CONN_Status ;
3938
4039/* These errors have general sql error state */
41- #define CONNECTION_SERVER_NOT_REACHED 101
42- #define CONNECTION_MSG_TOO_LONG 103
43- #define CONNECTION_COULD_NOT_SEND 104
44- #define CONNECTION_NO_SUCH_DATABASE 105
45- #define CONNECTION_BACKEND_CRAZY 106
46- #define CONNECTION_NO_RESPONSE 107
47- #define CONNECTION_SERVER_REPORTED_ERROR 108
48- #define CONNECTION_COULD_NOT_RECEIVE 109
49- #define CONNECTION_SERVER_REPORTED_WARNING 110
50- #define CONNECTION_NEED_PASSWORD 112
40+ #define CONNECTION_SERVER_NOT_REACHED 101
41+ #define CONNECTION_MSG_TOO_LONG 103
42+ #define CONNECTION_COULD_NOT_SEND 104
43+ #define CONNECTION_NO_SUCH_DATABASE 105
44+ #define CONNECTION_BACKEND_CRAZY 106
45+ #define CONNECTION_NO_RESPONSE 107
46+ #define CONNECTION_SERVER_REPORTED_ERROR 108
47+ #define CONNECTION_COULD_NOT_RECEIVE 109
48+ #define CONNECTION_SERVER_REPORTED_WARNING 110
49+ #define CONNECTION_NEED_PASSWORD 112
5150
5251/* These errors correspond to specific SQL states */
53- #define CONN_INIREAD_ERROR 201
54- #define CONN_OPENDB_ERROR 202
55- #define CONN_STMT_ALLOC_ERROR 203
56- #define CONN_IN_USE 204
57- #define CONN_UNSUPPORTED_OPTION 205
52+ #define CONN_INIREAD_ERROR 201
53+ #define CONN_OPENDB_ERROR 202
54+ #define CONN_STMT_ALLOC_ERROR 203
55+ #define CONN_IN_USE 204
56+ #define CONN_UNSUPPORTED_OPTION 205
5857/* Used by SetConnectoption to indicate unsupported options */
59- #define CONN_INVALID_ARGUMENT_NO 206
58+ #define CONN_INVALID_ARGUMENT_NO 206
6059/* SetConnectOption: corresponds to ODBC--"S1009" */
61- #define CONN_TRANSACT_IN_PROGRES 207
62- #define CONN_NO_MEMORY_ERROR 208
63- #define CONN_NOT_IMPLEMENTED_ERROR 209
64- #define CONN_INVALID_AUTHENTICATION 210
65- #define CONN_AUTH_TYPE_UNSUPPORTED 211
66- #define CONN_UNABLE_TO_LOAD_DLL 212
60+ #define CONN_TRANSACT_IN_PROGRES 207
61+ #define CONN_NO_MEMORY_ERROR 208
62+ #define CONN_NOT_IMPLEMENTED_ERROR 209
63+ #define CONN_INVALID_AUTHENTICATION 210
64+ #define CONN_AUTH_TYPE_UNSUPPORTED 211
65+ #define CONN_UNABLE_TO_LOAD_DLL 212
6766
68- #define CONN_OPTION_VALUE_CHANGED 213
69- #define CONN_VALUE_OUT_OF_RANGE 214
67+ #define CONN_OPTION_VALUE_CHANGED 213
68+ #define CONN_VALUE_OUT_OF_RANGE 214
7069
71- #define CONN_TRUNCATED 215
70+ #define CONN_TRUNCATED 215
7271
7372/* Conn_status defines */
74- #define CONN_IN_AUTOCOMMIT 0x01
75- #define CONN_IN_TRANSACTION 0x02
73+ #define CONN_IN_AUTOCOMMIT 0x01
74+ #define CONN_IN_TRANSACTION 0x02
7675
7776/* AutoCommit functions */
7877#define CC_set_autocommit_off (x ) (x->transact_status &= ~CONN_IN_AUTOCOMMIT)
@@ -86,31 +85,31 @@ typedef enum
8685
8786
8887/* Authentication types */
89- #define AUTH_REQ_OK 0
90- #define AUTH_REQ_KRB4 1
91- #define AUTH_REQ_KRB5 2
92- #define AUTH_REQ_PASSWORD 3
93- #define AUTH_REQ_CRYPT 4
88+ #define AUTH_REQ_OK 0
89+ #define AUTH_REQ_KRB4 1
90+ #define AUTH_REQ_KRB5 2
91+ #define AUTH_REQ_PASSWORD 3
92+ #define AUTH_REQ_CRYPT 4
9493
9594/* Startup Packet sizes */
96- #define SM_DATABASE 64
97- #define SM_USER 32
98- #define SM_OPTIONS 64
99- #define SM_UNUSED 64
100- #define SM_TTY 64
95+ #define SM_DATABASE 64
96+ #define SM_USER 32
97+ #define SM_OPTIONS 64
98+ #define SM_UNUSED 64
99+ #define SM_TTY 64
101100
102101/* Old 6.2 protocol defines */
103- #define NO_AUTHENTICATION 7
104- #define PATH_SIZE 64
105- #define ARGV_SIZE 64
106- #define NAMEDATALEN 16
102+ #define NO_AUTHENTICATION 7
103+ #define PATH_SIZE 64
104+ #define ARGV_SIZE 64
105+ #define NAMEDATALEN 16
107106
108107typedef unsigned int ProtocolVersion ;
109108
110109#define PG_PROTOCOL (major , minor ) (((major) << 16) | (minor))
111- #define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0)
112- #define PG_PROTOCOL_63 PG_PROTOCOL(1, 0)
113- #define PG_PROTOCOL_62 PG_PROTOCOL(0, 0)
110+ #define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0)
111+ #define PG_PROTOCOL_63 PG_PROTOCOL(1, 0)
112+ #define PG_PROTOCOL_62 PG_PROTOCOL(0, 0)
114113
115114/* This startup packet is to support latest Postgres protocol (6.4, 6.3) */
116115typedef struct _StartupPacket
@@ -275,12 +274,12 @@ struct ConnectionClass_
275274
276275
277276/* Accessor functions */
278- #define CC_get_socket (x ) (x->sock)
279- #define CC_get_database (x ) (x->connInfo.database)
280- #define CC_get_server (x ) (x->connInfo.server)
281- #define CC_get_DSN (x ) (x->connInfo.dsn)
282- #define CC_get_username (x ) (x->connInfo.username)
283- #define CC_is_onlyread (x ) (x->connInfo.onlyread[0] == '1')
277+ #define CC_get_socket (x ) (x->sock)
278+ #define CC_get_database (x ) (x->connInfo.database)
279+ #define CC_get_server (x ) (x->connInfo.server)
280+ #define CC_get_DSN (x ) (x->connInfo.dsn)
281+ #define CC_get_username (x ) (x->connInfo.username)
282+ #define CC_is_onlyread (x ) (x->connInfo.onlyread[0] == '1')
284283
285284
286285/* for CC_DSN_info */
0 commit comments