summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-10-27 19:37:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-10-27 19:37:42 +0000
commit1b0c30f68de7af7511b5a2c7297ff55c29a84db6 (patch)
tree6ec7b3b88b8d42a29fc80c80e919e7bc6310494c /src/include
parentf4d4bc827ffad194733344be07bab5a8c8b34deb (diff)
Install a more robust solution for the problem of infinite error-processing
recursion when we are unable to convert a localized error message to the client's encoding. We've been over this ground before, but as reported by Ibrar Ahmed, it still didn't work in the case of conversion failures for the conversion-failure message itself :-(. Fix by installing a "circuit breaker" that disables attempts to localize this message once we get into recursion trouble. Patch all supported branches, because it is in fact broken in all of them; though I had to add some missing translations to the older branches in order to expose the failure in the particular test case I was using.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/elog.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 06b91f05aff..b255253e45c 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.81 2005/10/15 02:49:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.81.2.1 2008/10/27 19:37:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -282,6 +282,7 @@ extern int Log_destination;
/* Other exported functions */
extern void DebugFileOpen(void);
extern char *unpack_sql_state(int sql_state);
+extern bool in_error_recursion_trouble(void);
#ifdef HAVE_SYSLOG
extern void set_syslog_parameters(const char *ident, int facility);