Re: Setting locale per connection

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Setting locale per connection
Дата
Msg-id 24946.1057125537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Setting locale per connection  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: Setting locale per connection  (Behdad Esfahbod <behdad@bamdad.org>)
Список pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On Wed, 2 Jul 2003, Behdad Esfahbod wrote:
>> so I have wrote my 10lines function as a wrapper around
>> setlocale, that is attached.

> Hmm, I'd think there'd be some potential for danger there.  I don't play
> with the locale stuff, but if the collation changes and you've got indexed
> text (varchar, char) fields, wouldn't the index no longer necessarily be
> in the correct order?

Indeed, this is exactly why Postgres goes out of its way to prevent you
from changing the backend's collation setting on-the-fly.  The proposed
function is a great way to shoot yourself in the foot :-(.  If you doubt
it, check the archives from two or three years ago when we did not have
the interlock to force LC_COLLATE to be frozen at initdb time ...
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: cvs build failure
Следующее
От: Kenji Sugita
Дата:
Сообщение: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument