aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/ipc_test.c
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/backend/port/ipc_test.c
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/backend/port/ipc_test.c')
-rw-r--r--src/backend/port/ipc_test.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/port/ipc_test.c b/src/backend/port/ipc_test.c
index fa5066fd7e8..c4a6f487db5 100644
--- a/src/backend/port/ipc_test.c
+++ b/src/backend/port/ipc_test.c
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.23 2008/01/01 19:45:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.24 2008/03/24 18:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -186,6 +186,13 @@ errdetail(const char *fmt,...)
}
int
+errdetail_log(const char *fmt,...)
+{
+ fprintf(stderr, "DETAIL: %s\n", fmt);
+ return 0; /* return value does not matter */
+}
+
+int
errhint(const char *fmt,...)
{
fprintf(stderr, "HINT: %s\n", fmt);