aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2010-03-08 12:15:24 +0000
committerMichael Meskes <meskes@postgresql.org>2010-03-08 12:15:24 +0000
commit6e2cf34ec12f26682a88c14b0d01867ecff8face (patch)
tree1056440f9573473361765a36b34edf3bca274ebe /src
parent2a0dec7888af165f48e5aa94b0262f8c0ac050b6 (diff)
downloadpostgresql-6e2cf34ec12f26682a88c14b0d01867ecff8face.tar.gz
postgresql-6e2cf34ec12f26682a88c14b0d01867ecff8face.zip
Better test the content of the SQLSTATE string in ecpglib than the pointer.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c
index d4b6f08cc9b..ea48f082dca 100644
--- a/src/interfaces/ecpg/ecpglib/error.c
+++ b/src/interfaces/ecpg/ecpglib/error.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.24 2010/03/05 13:57:08 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.25 2010/03/08 12:15:24 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -306,7 +306,7 @@ ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat)
message = PQerrorMessage(conn);
}
- if (sqlstate == ECPG_SQLSTATE_ECPG_INTERNAL_ERROR)
+ if (strcmp(sqlstate, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR) == 0)
{
/* we might get here if the connection breaks down, so let's
* check for this instead of giving just the generic internal error */