summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/error.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2003-08-24 18:36:38 +0000
committerPeter Eisentraut <peter_e@gmx.net>2003-08-24 18:36:38 +0000
commitc3664c0c007931102727a016208ca604123622e0 (patch)
treebd43245bc6a2ddc39c1caf66e07af2b2efb8d5a2 /src/interfaces/ecpg/ecpglib/error.c
parentb4ab39ff05ae1489e97ec9e844ad63c20cc7e044 (diff)
downloadpostgresql-c3664c0c007931102727a016208ca604123622e0.tar.gz
Add macros for error result fields to libpq.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/error.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c
index 82f2ccca36..48b879d546 100644
--- a/src/interfaces/ecpg/ecpglib/error.c
+++ b/src/interfaces/ecpg/ecpglib/error.c
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.7 2003/08/08 13:16:20 petere Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.8 2003/08/24 18:36:38 petere Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -164,10 +164,10 @@ ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat)
if (result)
{
- sqlstate = PQresultErrorField(result, 'C');
+ sqlstate = PQresultErrorField(result, PG_DIAG_SQLSTATE);
if (sqlstate == NULL)
sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
- message = PQresultErrorField(result, 'M');
+ message = PQresultErrorField(result, PG_DIAG_MESSAGE_PRIMARY);
}
else
{