Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6e2cf34

Browse files
author
Michael Meskes
committed
Better test the content of the SQLSTATE string in ecpglib than the pointer.
1 parent 2a0dec7 commit 6e2cf34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/ecpg/ecpglib/error.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.24 2010/03/05 13:57:08 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.25 2010/03/08 12:15:24 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -306,7 +306,7 @@ ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat)
306306
message = PQerrorMessage(conn);
307307
}
308308

309-
if (sqlstate == ECPG_SQLSTATE_ECPG_INTERNAL_ERROR)
309+
if (strcmp(sqlstate, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR) == 0)
310310
{
311311
/* we might get here if the connection breaks down, so let's
312312
* check for this instead of giving just the generic internal error */

0 commit comments

Comments
 (0)