summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-10-27 19:37:22 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-10-27 19:37:22 +0000
commitb0169bb1246b21b760e1c02bec83e6112a68dff8 (patch)
tree09178792cb45f2432c8c4ef37e423cd2f20fc4c4 /doc/src
parentf3a0688ace40f012f4de95b7b722fbfbb802bea9 (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 'doc/src')
-rw-r--r--doc/src/sgml/sources.sgml6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index e78e59ad900..fe581f39be9 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.31 2008/09/07 02:01:04 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.32 2008/10/27 19:37:21 tgl Exp $ -->
<chapter id="source">
<title>PostgreSQL Coding Conventions</title>
@@ -176,7 +176,7 @@ ereport(ERROR,
<para>
<function>errmsg_internal(const char *msg, ...)</function> is the same as
<function>errmsg</>, except that the message string will not be
- included in the internationalization message dictionary.
+ translated nor included in the internationalization message dictionary.
This should be used for <quote>cannot happen</> cases that are probably
not worth expending translation effort on.
</para>
@@ -271,7 +271,7 @@ elog(level, "format string", ...);
ereport(level, (errmsg_internal("format string", ...)));
</programlisting>
Notice that the SQLSTATE error code is always defaulted, and the message
- string is not included in the internationalization message dictionary.
+ string is not subject to translation.
Therefore, <function>elog</> should be used only for internal errors and
low-level debug logging. Any message that is likely to be of interest to
ordinary users should go through <function>ereport</>. Nonetheless,