Re: locale

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: locale
Дата
Msg-id 13283.1081432566@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: locale  (Dennis Bjorklund <db@zigo.dhs.org>)
Ответы Re: locale  (Dennis Bjorklund <db@zigo.dhs.org>)
Re: locale  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Dennis Bjorklund <db@zigo.dhs.org> writes:
> I can also imagine the indexes being wrong when you keep the encoding of
> tables when you create a new database. Since the same character can be
> represented differently, the sort order also changes if you try to
> interpret something with another encoding then what the compare operator
> think it is. That makes the index invalid.

See my previous point: the index does not actually fail, in our current
implementation, because strcoll() is unaffected by the database's
encoding setting.  You'd be likely to have trouble with I/O translation
and with other encoding-dependent operations like upper()/lower() ...
but not with indexes.

> It's simply broken if you ask me.

It's certainly ungood, but I don't think we can materially improve
things without a fundamental rewrite along the lines of Peter's proposal
to support per-column locale/encoding.  Database-level settings are
simply the wrong tool for this.
        regards, tom lane


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

Предыдущее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: PostgreSQL configuration
Следующее
От: Dennis Bjorklund
Дата:
Сообщение: Re: locale