Re: Collation sequence and use of operatings system's locale

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Collation sequence and use of operatings system's locale
Дата
Msg-id 15828.1193718857@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Collation sequence and use of operatings system's locale  (James Gates <james.gates@sun.com>)
Список pgsql-general
James Gates <james.gates@sun.com> writes:
> I'm working with a issue where it seems the PostgreSQL server collation
> sequence for certain locales don't match the operating system's
> collation sequence for the same locale (set during initdb).
> I can reproduce this on both 8.1.9 & 8.2.5 on Solaris (both Nevada & 10).

FWIW, your example works as expected for me with 8.3 CVS tip on Fedora
Core 6:

postgres=# \encoding
LATIN1
postgres=# show lc_collate ;
   lc_collate
----------------
 sv_SE.iso88591
(1 row)

postgres=# select barf,ascii(barf) from jim order by barf asc;
 barf | ascii
------+-------
 a    |    97
 A    |    65
 �    |   197
 �    |   228
 �    |   196
 �    |   214
(6 rows)

> In fact, I can't tell where this order is derived from?

In this context Postgres believes whatever strcoll() tells it.  I don't
see any obvious hole in your methodology (except that I'm dubious about
the exhibited arguments for sort(1)) so it seems possible you've got a
bug in Solaris' strcoll().  But you should probably triple-check the
question of whether what's arriving at strcoll() is in the encoding it
expects.

            regards, tom lane

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Raid Chunk Sizes for DSS type DB
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Base Backups from PITR Standby