1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Share PG_DIAG_* macros between client and server and use them internally.

This commit is contained in:
Peter Eisentraut
2003-08-27 00:33:34 +00:00
parent 73e3edf2e6
commit f2c2943aae
6 changed files with 49 additions and 44 deletions

View File

@ -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