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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Gates <james(dot)gates(at)sun(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Collation sequence and use of operatings system's locale
Date: 2007-10-30 04:34:17
Message-ID: 15828.1193718857@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

James Gates <james(dot)gates(at)sun(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-10-30 05:02:25 Re: SSL Connectivity on Solaris 10 x86
Previous Message Scott Marlowe 2007-10-30 04:18:04 Re: Raid Chunk Sizes for DSS type DB