Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group