summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-10-20 01:31:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-10-20 01:31:50 +0000
commit52e98f84154fb288791214043dfddbc1ef8dd2c9 (patch)
treef9cb576cbaf24cb23ce6e19ec13f1c2485d3f3b6 /src
parenta4baf229a4298bf478c23ca74685f8703dfd3517 (diff)
Don't convert debug/notice/warning messages into errors just because
they occur inside error processing. This is a back-port of a logic change already present in 8.0. Partial fix for bug#1976 --- doesn't cure the wrong-encoding problem, but at least stops it from causing unintended ERRORs.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/error/elog.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index c1b0fa1faca..2186920d7e3 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.125.2.1 2005/10/14 16:41:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.125.2.2 2005/10/20 01:31:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -244,18 +244,14 @@ errstart(int elevel, const char *filename, int lineno,
* Okay, crank up a stack entry to store the info in.
*/
- if (recursion_depth++ > 0)
+ if (recursion_depth++ > 0 && elevel >= ERROR)
{
/*
- * Ooops, error during error processing. Clear ErrorContext and
- * force level up to ERROR or greater, as discussed at top of
- * file. Adjust output decisions too.
+ * Ooops, error during error processing. Clear ErrorContext as
+ * discussed at top of file. We will not return to the original
+ * error's reporter or handler, so we don't need it.
*/
MemoryContextReset(ErrorContext);
- output_to_server = true;
- if (whereToSendOutput == Remote && elevel != COMMERROR)
- output_to_client = true;
- elevel = Max(elevel, ERROR);
/*
* If we recurse more than once, the problem might be something