Karsten Hilbert wrote:
> On Tue, Dec 23, 2008 at 06:45:17PM -0300, Alvaro Herrera wrote:
> > Hmm, isn't client_encoding reported in the startup packet sent by the
> > server, after auth?
>
> That would not quite be enough -- I am talking about
> messages reported *during* auth, say
>
> FATAL: password authentication failed for user "postgres"
>
> or
>
> fe_sendauth: no password supplied
>
> both of which, in other locales, may contain non-ASCII characters.
Those are sent in the server encoding IIRC (which admittedly you don't
have a way to know, at that point.)
And I'm now wondering if we should delay initializing the translation
stuff until after client_encoding has been reported.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support