1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Be a little bit more careful about using sqlstate, in case libpq returned

NULL for it.
This commit is contained in:
Peter Eisentraut
2003-08-08 13:16:20 +00:00
parent 0bf70870db
commit e39bc695d6
2 changed files with 22 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.15 2003/08/04 00:43:32 momjian Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.16 2003/08/08 13:16:20 petere Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -164,6 +164,9 @@ ECPGnoticeReceiver(void *arg, const PGresult *result)
int sqlcode;
if (sqlstate == NULL)
sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
/* these are not warnings */
if (strncmp(sqlstate, "00", 2) == 0)
return;