Re: Is it bad sorting in UTF ??

From: Richard Huxton <dev(at)archonet(dot)com>
To: wstrzalka <wstrzalka(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is it bad sorting in UTF ??
Date: 2009-04-14 11:57:18
Message-ID: 49E47A1E.4080200@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

wstrzalka wrote:
> Why PG sort's my data in case insensitive manner?

> masterdb=# select name, setting from pg_settings WHERE name ilike 'lc
> %';
> name | setting
> -------------+-------------
> lc_collate | en_US.UTF-8

Because that's what en_US.UTF-8 does. If you want "computer-style"
sorting choose the "C" locale. You'll need to dump all your databases an
re-initdb to do that I'm afraid. I believe 8.4 is going to allow
different locales for each database though.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2009-04-14 12:10:40 Re: Is it bad sorting in UTF ??
Previous Message wstrzalka 2009-04-14 11:42:39 Is it bad sorting in UTF ??