ORDER BY: lexicographic ordering of names

From: "Bryan Herger" <bryanh(at)autonomy(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: ORDER BY: lexicographic ordering of names
Date: 2009-03-18 20:32:41
Message-ID: D82F64731BE07A4FB46D23F4D9D031BC01BE4DE8@VEX1.verity.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

All,

I am porting a database from MS SQL Server to Postgres. One of the
tables contains a list of names, which I would like to list
alphabetically. I noticed in the "O" names the following difference:

MSSQL:

O'Daniel

O'Neill

Oliveira

Oliver

While PGSQL sorts as if the apostrophe was not there:

O'Daniel

Oliveira

Oliver

O'Neill

I think the MSSQL output is more correct for listing names
alphabetically. How can I configure or query PGSQL to get the same sort
order?

Thanks,

Bryan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-03-18 20:54:52 Re: How to configure PostgreSQl for low-profile users
Previous Message dfx 2009-03-18 20:15:31 How to configure PostgreSQl for low-profile users