diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-06-19 02:17:06 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-06-19 02:17:06 +0000 |
commit | 76d38cb0c693985f8a2473e1bcd2ff093aebfe62 (patch) | |
tree | 425be1b1990acce878ad4bd239b8e05bd3d061ba /src/interfaces/odbc/socket.c | |
parent | 3709a5ada7e033c0cc4551018df4433e09abc001 (diff) | |
download | postgresql-76d38cb0c693985f8a2473e1bcd2ff093aebfe62.tar.gz postgresql-76d38cb0c693985f8a2473e1bcd2ff093aebfe62.zip |
Changed the error handling as follows.
1) ERRORs cause an SQL_ERROR and the SQLSTATE='S1000'.
2) NOTICEs cause an SQL_SUCCESS_WITH_INFO and the succeeding
SQLError() returns the NOTICE message.
Diffstat (limited to 'src/interfaces/odbc/socket.c')
-rw-r--r-- | src/interfaces/odbc/socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/odbc/socket.c b/src/interfaces/odbc/socket.c index 650ec9ecb00..de695058b9c 100644 --- a/src/interfaces/odbc/socket.c +++ b/src/interfaces/odbc/socket.c @@ -195,17 +195,19 @@ SOCK_put_n_char(SocketClass *self, char *buffer, int len) /* * bufsize must include room for the null terminator * will read at most bufsize-1 characters + null. + * returns TRUE if truncation occurs. */ -void +BOOL SOCK_get_string(SocketClass *self, char *buffer, int bufsize) { register int lf = 0; for (lf = 0; lf < bufsize; lf++) if (!(buffer[lf] = SOCK_get_next_byte(self))) - return; + return FALSE; buffer[bufsize - 1] = '\0'; + return TRUE; } |