aboutsummaryrefslogtreecommitdiff
path: root/doc/src
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 /doc/src
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 'doc/src')
-rw-r--r--doc/src/sgml/sources.sgml13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index 65652dd3053..78d60bb5ae4 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.29 2007/11/07 13:12:21 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.30 2008/03/24 18:08:47 tgl Exp $ -->
<chapter id="source">
<title>PostgreSQL Coding Conventions</title>
@@ -160,6 +160,17 @@ ereport(ERROR,
</listitem>
<listitem>
<para>
+ <function>errdetail_log(const char *msg, ...)</function> is the same as
+ <function>errdetail</> except that this string goes only to the server
+ log, never to the client. If both <function>errdetail</> and
+ <function>errdetail_log</> are used then one string goes to the client
+ and the other to the log. This is useful for error details that are
+ too security-sensitive or too bulky to include in the report
+ sent to the client.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<function>errhint(const char *msg, ...)</function> supplies an optional
<quote>hint</> message; this is to be used when offering suggestions
about how to fix the problem, as opposed to factual details about