From: Tom Lane Date: Thu, 20 Oct 2005 01:31:50 +0000 (+0000) Subject: Don't convert debug/notice/warning messages into errors just because X-Git-Tag: REL7_4_10~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52e98f84154fb288791214043dfddbc1ef8dd2c9;p=thirdparty%2Fpostgresql.git 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. --- 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