1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +03:00

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.
This commit is contained in:
Hiroshi Inoue
2001-06-19 02:17:06 +00:00
parent 3709a5ada7
commit 76d38cb0c6
4 changed files with 52 additions and 27 deletions

View File

@ -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;
}