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/include/postgres_ext.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/include/postgres_ext.h') diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index b252453bbf..c61bd4de0f 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -15,7 +15,7 @@ * use header files that are otherwise internal to Postgres to interface * with the backend. * - * $Id: postgres_ext.h,v 1.12 2003/03/18 17:21:07 momjian Exp $ + * $Id: postgres_ext.h,v 1.13 2003/08/27 00:33:34 petere Exp $ * *------------------------------------------------------------------------- */ @@ -47,4 +47,21 @@ typedef unsigned int Oid; */ #define NAMEDATALEN 64 + +/* + * Identifiers of error message fields. Kept here to keep common + * between frontend and backend, and also to export them to libpq + * applications. + */ +#define PG_DIAG_SEVERITY 'S' +#define PG_DIAG_SQLSTATE 'C' +#define PG_DIAG_MESSAGE_PRIMARY 'M' +#define PG_DIAG_MESSAGE_DETAIL 'D' +#define PG_DIAG_MESSAGE_HINT 'H' +#define PG_DIAG_STATEMENT_POSITION 'P' +#define PG_DIAG_CONTEXT 'W' +#define PG_DIAG_SOURCE_FILE 'F' +#define PG_DIAG_SOURCE_LINE 'L' +#define PG_DIAG_SOURCE_FUNCTION 'R' + #endif -- cgit v1.2.1