Re: garbage in psql -l

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: garbage in psql -l
Дата
Msg-id 26269.1259102580@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: garbage in psql -l  (Roger Leigh <rleigh@codelibre.net>)
Ответы Re: garbage in psql -l
Список pgsql-hackers
Roger Leigh <rleigh@codelibre.net> writes:
> On Tue, Nov 24, 2009 at 02:19:27PM -0500, Tom Lane wrote:
>> I wonder whether the most prudent solution wouldn't be to prevent
>> default use of linestyle=unicode if ~/.psqlrc hasn't been read.

> This problem is caused when there's a mismatch between the
> client encoding and the user's locale.  We can detect this at
> runtime and fall back to ASCII if we know they are incompatible.

Well, no, that is *one* of the possible failure modes.  I've hit others
already in the short time that the patch has been installed.  The one
that's bit me most is that the locale environment seen by psql doesn't
necessarily match what my xterm at the other end of an ssh connection
is prepared to do --- which is something that psql simply doesn't have
a way to detect.  Again, this is something that's never mattered before
unless one was really pushing non-ASCII data around, and even then it
was often possible to be sloppy.

I'd be more excited about finding a way to use linestyle=unicode by
default if it had anything beyond cosmetic benefits.  But it doesn't,
and it's hard to justify ratcheting up the requirements for users to get
their configurations exactly straight when that's all they'll get for it.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: SE-PgSQL patch review
Следующее
От: Roger Leigh
Дата:
Сообщение: Re: garbage in psql -l