mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
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.
This commit is contained in:
@ -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>
|
||||
@ -158,6 +158,17 @@ ereport(ERROR,
|
||||
<function>errmsg</>.
|
||||
</para>
|
||||
</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
|
||||
|
Reference in New Issue
Block a user