summaryrefslogtreecommitdiff
path: root/src/include/postgres_ext.h
diff options
context:
space:
mode:
authorPeter Eisentraut2003-08-27 00:33:34 +0000
committerPeter Eisentraut2003-08-27 00:33:34 +0000
commitf2c2943aae143cd6cfa6e3195658e7e15de16000 (patch)
treed49186f1c40aaae6f22890099532a0e9f49587cc /src/include/postgres_ext.h
parent73e3edf2e64925a5a012c4155ab453a7a864895a (diff)
Share PG_DIAG_* macros between client and server and use them internally.
Diffstat (limited to 'src/include/postgres_ext.h')
-rw-r--r--src/include/postgres_ext.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h
index b252453bbff..c61bd4de0fe 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