1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +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:
Tom Lane
2008-03-24 18:08:47 +00:00
parent 7feabcbf7f
commit 05fc744b96
5 changed files with 75 additions and 9 deletions

View File

@ -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 $
*
*-------------------------------------------------------------------------
*/
@ -185,6 +185,13 @@ errdetail(const char *fmt,...)
return 0; /* return value does not matter */
}
int
errdetail_log(const char *fmt,...)
{
fprintf(stderr, "DETAIL: %s\n", fmt);
return 0; /* return value does not matter */
}
int
errhint(const char *fmt,...)
{