aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-fe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/libpq-fe.h')
-rw-r--r--src/interfaces/libpq/libpq-fe.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index a73eae2087a..828c533c1a3 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -110,6 +110,13 @@ typedef enum
PQERRORS_VERBOSE /* all the facts, ma'am */
} PGVerbosity;
+typedef enum
+{
+ PQSHOW_CONTEXT_NEVER, /* never show CONTEXT field */
+ PQSHOW_CONTEXT_ERRORS, /* show CONTEXT for errors only (default) */
+ PQSHOW_CONTEXT_ALWAYS /* always show CONTEXT field */
+} PGContextVisibility;
+
/*
* PGPing - The ordering of this enum should not be altered because the
* values are exposed externally via pg_isready.
@@ -337,6 +344,10 @@ extern void PQinitOpenSSL(int do_ssl, int do_crypto);
/* Set verbosity for PQerrorMessage and PQresultErrorMessage */
extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity);
+/* Set CONTEXT visibility for PQerrorMessage and PQresultErrorMessage */
+extern PGContextVisibility PQsetErrorContextVisibility(PGconn *conn,
+ PGContextVisibility show_context);
+
/* Enable/disable tracing */
extern void PQtrace(PGconn *conn, FILE *debug_port);
extern void PQuntrace(PGconn *conn);