Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> When the conversion function doesn't work, any attempt to send any text
>> to the client will fail.
>
> Ah, now I remember: we arranged to short-circuit translation of the
> error message when we were in this situation. But it will still get
> passed through the encoding converter (rather uselessly, if it's all
> ASCII). I wonder how ugly it would be to try to suppress encoding
> conversion as well?
The error message might contain user data, which might contain non-ASCII
characters. Or maybe not, but it seems like a shaky assumption to make.
Sending invalidly encoded data to the client is a bad idea; who knows
how the client will react.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com