From f2c2943aae143cd6cfa6e3195658e7e15de16000 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 27 Aug 2003 00:33:34 +0000 Subject: Share PG_DIAG_* macros between client and server and use them internally. --- src/interfaces/libpq/fe-protocol2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/interfaces/libpq/fe-protocol2.c') diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 834aa69bbf4..1b766996910 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.6 2003/08/04 02:40:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.7 2003/08/27 00:33:34 petere Exp $ * *------------------------------------------------------------------------- */ @@ -828,7 +828,7 @@ pqGetErrorNotice2(PGconn *conn, bool isError) { /* what comes before the colon is severity */ *splitp = '\0'; - pqSaveMessageField(res, 'S', workBuf.data); + pqSaveMessageField(res, PG_DIAG_SEVERITY, workBuf.data); startp = splitp + 3; } else @@ -841,16 +841,16 @@ pqGetErrorNotice2(PGconn *conn, bool isError) { /* what comes before the newline is primary message */ *splitp++ = '\0'; - pqSaveMessageField(res, 'M', startp); + pqSaveMessageField(res, PG_DIAG_MESSAGE_PRIMARY, startp); /* the rest is detail; strip any leading whitespace */ while (*splitp && isspace((unsigned char) *splitp)) splitp++; - pqSaveMessageField(res, 'D', splitp); + pqSaveMessageField(res, PG_DIAG_MESSAGE_DETAIL, splitp); } else { /* single-line message, so all primary */ - pqSaveMessageField(res, 'M', startp); + pqSaveMessageField(res, PG_DIAG_MESSAGE_PRIMARY, startp); } /* -- cgit v1.2.3