Install a more robust solution for the problem of infinite error-processing

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3e86678ffea8595d10e984fcf659d474cc7092ed
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-10-27T19:37:36Z
Releases: 8.2.11
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.

Files

PathChange+/−
doc/src/sgml/sources.sgml modified +3 −3
src/backend/nls.mk modified +1 −3
src/backend/utils/error/elog.c modified +55 −20
src/backend/utils/mb/wchar.c modified +20 −7
src/include/utils/elog.h modified +2 −1