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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Different sort order


  • From: Gregory Stark <stark(at)enterprisedb(dot)com>
  • To: Poul Møller Hansen <freebsd(at)pbnet(dot)dk>
  • Cc: "pgsql general" <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: Different sort order
  • Date: Mon, 28 May 2007 19:21:44 +0100
  • Message-id: <87d50kkdvr.fsf@oxford.xeocode.com> <text/plain>

Poul Møller Hansen <freebsd(at)pbnet(dot)dk> writes:

> I'm wondering why the sort order on these two servers behaves differently.
> The only difference I can see is that one is using a 32.bits Ubuntu and the
> other is on 64bits versions of Ubuntu.
> But why this difference ?

Try on both servers:

  show lc_collate

Unfortunately you have to initdb to set the locale. You can't set it per
database or change it once it's initialized.


This one looks like en_US or something similar:

> mydb=# select * from test order by felt1;
> felt1 --------
> test1
> test_1
> test2
> test_2
> test3
> test_3
> (6 rows)
>

And this one looks like C:

> mydb=# select * from test order by felt1;
> felt1 --------
> test1
> test2
> test3
> test_1
> test_2
> test_3
> (6 rows)


-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group