diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2003-08-27 00:33:34 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2003-08-27 00:33:34 +0000 |
| commit | f2c2943aae143cd6cfa6e3195658e7e15de16000 (patch) | |
| tree | d49186f1c40aaae6f22890099532a0e9f49587cc /src/interfaces/libpq/fe-protocol2.c | |
| parent | 73e3edf2e64925a5a012c4155ab453a7a864895a (diff) | |
Share PG_DIAG_* macros between client and server and use them internally.
Diffstat (limited to 'src/interfaces/libpq/fe-protocol2.c')
| -rw-r--r-- | src/interfaces/libpq/fe-protocol2.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); } /* |
