Re: Windows locale cause server to send invalid data encoding to client

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Antoine <plaskowski(dot)stanislas(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Windows locale cause server to send invalid data encoding to client
Date: 2021-07-14 14:43:15
Message-ID: 3485156.1626273795@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> On Wed, Jul 14, 2021 at 10:19:59AM -0400, Tom Lane wrote:
>> I wonder if we should decline
>> to translate any error messages until we've established the requested
>> client encoding. Sending the message in English isn't ideal either,
>> but it'd avoid this hazard.

> I'm not sure which one is the worst. One the bright side there aren't that
> many messages that can be sent until the client encoding can be set up for I'm
> +0.5 for this change.

Yeah, it's ugly either way. I think though that the reason we don't hear
more complaints about this is that such messages are currently sent using
the language and encoding derived from the postmaster's environment.
In simple cases that'll be the same as the client's environment and
everything works. So after thinking harder, I'm afraid that breaking that
scenario would make this idea a net loss.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-07-14 16:26:40 Re: printf %s with NULL pointer (was Re: BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped)
Previous Message Pawel Kudzia 2021-07-14 14:37:08 Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows