Re: More on character encoding in SELECTs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: More on character encoding in SELECTs
Дата
Msg-id 18985.977152724@sss.pgh.pa.us
обсуждение исходный текст
Ответ на More on character encoding in SELECTs  (Rolf Johansson <rojo@nocrew.org>)
Список pgsql-general
Rolf Johansson <rojo@nocrew.org> writes:
> When I do a SELECT xx FROM xx WHERE xx >= '�' in psql, it returns lines where
> xx is starting with "A". With "�", it returns lines where xx starts with "O".

> I've tried to set LC_ALL to sv_SE or swedish, nothing happens.

Don't forget that the controlling value of LC_ALL is the one in the
postmaster's environment, not the psql client's.

Also, if you restart the postmaster with a new LC_ALL setting, you will
have to drop and rebuild indexes on text columns that contain non-ASCII
characters, since they'll be out of order according to the new collation
rule.

It's possible that the misbehavior you are seeing comes from indexes
becoming corrupted because they've been run under different collation
rules at different times.  You need to be careful always to start the
postmaster with the same LC_ value(s).  (7.1 will enforce this by saving
LC_COLLATE at initdb time, but in current releases you have to be
careful.)

> Is the rpm for Postgres 7.0.3 compiled with locale support?

It should be...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Character encoding problem using Tcl
Следующее
От: "Martin A. Marques"
Дата:
Сообщение: check constraint