aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/elog.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-24 18:08:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-24 18:08:47 +0000
commit05fc744b967d15fa07c484ad87dd8cc943ad839f (patch)
tree451fe0c2b9be3fe55ab69f9cbcb7f19eda3b6053 /src/include/utils/elog.h
parent7feabcbf7f2d140289d79b97ba99ff44711fcf72 (diff)
downloadpostgresql-05fc744b967d15fa07c484ad87dd8cc943ad839f.tar.gz
postgresql-05fc744b967d15fa07c484ad87dd8cc943ad839f.zip
Add a new ereport auxiliary function errdetail_log(), which works the same as
errdetail except the string goes only to the server log, replacing the normal errdetail there. This provides a reasonably clean way of dealing with error details that are too security-sensitive or too bulky to send to the client. This commit just adds the infrastructure --- actual uses to follow.
Diffstat (limited to 'src/include/utils/elog.h')
-rw-r--r--src/include/utils/elog.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 78939baa898..3b980cae79a 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.91 2008/03/10 12:55:13 mha Exp $
+ * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.92 2008/03/24 18:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -126,6 +126,12 @@ errdetail(const char *fmt,...)
__attribute__((format(printf, 1, 2)));
extern int
+errdetail_log(const char *fmt,...)
+/* This extension allows gcc to check the format string for consistency with
+ the supplied arguments. */
+__attribute__((format(printf, 1, 2)));
+
+extern int
errhint(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
@@ -258,6 +264,7 @@ typedef struct ErrorData
int sqlerrcode; /* encoded ERRSTATE */
char *message; /* primary error message */
char *detail; /* detail error message */
+ char *detail_log; /* detail error message for server log only */
char *hint; /* hint message */
char *context; /* context message */
int cursorpos; /* cursor index into query string */