git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a0dec7)
Better test the content of the SQLSTATE string in ecpglib than the pointer.
Mon, 8 Mar 2010 12:15:24 +0000 (12:15 +0000)
Mon, 8 Mar 2010 12:15:24 +0000 (12:15 +0000)

diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c
index d4b6f08cc9bc8406055607c3dac0907ceda58b9d..ea48f082dcab50ad1364d6d15b8909912db25044 100644 (file)
--- 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 */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /