Re: sort order with < & > in varchar fields

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sort order with < & > in varchar fields
Дата
Msg-id 16929.979745295@sss.pgh.pa.us
обсуждение исходный текст
Ответ на sort order with < & > in varchar fields  (Rolf Johansson <rojo@nocrew.org>)
Список pgsql-sql
Rolf Johansson <rojo@nocrew.org> writes:
> Is there documentation on how >= and <= works with varchar
> fields? Does pg count in the "," character or ignore it?

That depends.  If you compiled with --enable-locale then it's
whatever strcoll() says for the locale you are running the
postmaster in.  If not, it's whatever strcmp() says, which is
normally plain ASCII collation order.

Note: beware of changing the postmaster's locale on the fly;
this can leave your indexes on textual columns out of order and
hence effectively corrupt.  You can fix that by dropping/rebuilding
such indexes, or with REINDEX.
        regards, tom lane


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

Предыдущее
От: Rolf Johansson
Дата:
Сообщение: sort order with < & > in varchar fields
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: [INTERFACES] outer join in PostgreSql