Search Postgresql Archives

help understanding collation order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

postgresl-8.4.6 (database encoding is utf8)

the following sql behaves strangely on one of my servers:

  create table ttt(id serial not null primary key, name text);
  insert into ttt (name) values ('CLARKE, DAVID');
  insert into ttt (name) values ('CLARK, PETER');
  insert into ttt (name) values ('CLARKE');
  insert into ttt (name) values ('CLARK');
  select * from ttt order by name;
  drop table ttt;

the behaviour i expect (and see on macosx-10.6.6) is:

   id |     name      
  ----+---------------
    4 | CLARK
    2 | CLARK, PETER
    3 | CLARKE
    1 | CLARKE, DAVID

the behaviour i don't expect but see anyway (on debian-5.0) is:

   id |     name      
  ----+---------------
    4 | CLARK
    3 | CLARKE
    1 | CLARKE, DAVID
    2 | CLARK, PETER

the "good" server has lc_messages='en_AU' and the
"bad" server has lc_messages="en_AU.utf8" which may
be relevant but i can't successfully alter these
values (i.e. postgres doesn't restart after i try)
so i'm hoping it's not relevant.

can anyone explain what i've done wrong here and
suggest what i can do to fix it?

cheers,
raf

p.s. the postgres installation was PostgresPlus/8.4SS that
was subsequently upgraded via postgres one click installers.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux