pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: basti <mailinglist@unix-solution.de>
To: pgsql-general@postgresql.org
Subject: Re: postgresql order lowercase before uppercase
Date: Thu, 18 Mar 2021 17:19:56 +0100
Message-ID: <fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at> (raw)
In-Reply-To: <5a174fad-c30d-6d65-38c8-a3d9af8377df@unix-solution.de>
References: <5a174fad-c30d-6d65-38c8-a3d9af8377df@unix-solution.de>

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






view thread (12+ messages)  latest in thread

Message-ID: <fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at>
Permalink:  ../fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at/
Also on:    postgresql.org/message-id/fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, mailinglist@unix-solution.de
  Subject: Re: postgresql order lowercase before uppercase
  In-Reply-To: <fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at>
  References: <5a174fad-c30d-6d65-38c8-a3d9af8377df@unix-solution.de> <fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox