Re: BUG #2319: psql utf8/latin1 client_encoding bug when using '-c'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2319: psql utf8/latin1 client_encoding bug when using '-c'
Дата
Msg-id 10905.1142470588@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2319: psql utf8/latin1 client_encoding bug when using '-c'  ("Mattias Kregert" <mattias@kregert.se>)
Список pgsql-bugs
"Mattias Kregert" <mattias@kregert.se> writes:
> -- ...but this does not.
> % psql -h server mydb -c "set client_encoding to 'latin1'; select * from
> mytable where text='ÅÄÖ';"
> ERROR:  invalid UTF-8 byte sequence detected near byte 0xc5

There is no hope of that ever working, since the string will be read (and
converted to the server's encoding if relevant) before the SET is
executed.  Better find another way to do what you want.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2315: Crash engine after modify "active" function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2317: Wrong sorting order for (VW)