Search Postgresql Archives

Re: postgresql order lowercase before uppercase

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

 



On Thu, 2021-03-18 at 15:39 +0100, basti wrote:
> I need to as follow:
> 
> ande
> Amma
> Anit
> Anti
> Brac
> Cali
> ....
> 
> I have try ORDER by name COLLATE 'C';
> 
> but this order as follow:
> 
> Amma
> Anit
> Anti
> Brac
> Cali
> ....
> ande

Create an ICU collation:

  CREATE COLLATION inv (PROVIDER = icu, LOCALE = "en-US@CaseFirst=LowerFirst");

Then use

  ORDER BY name COLLATE inv

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux