Re: postgresql order lowercase before uppercase

2021-03-19 Thread Laurenz Albe
On Fri, 2021-03-19 at 10:12 +0100, basti wrote: > >> SELECT a.name > >> FROM foo as a > >> LEFT JOIN (SELECT name from foo WHERE name = 'lowercase name') as b > >> on a.name = b.name > >> ORDER by b.name,a.name > >> > >> does it. > >> > >> perhaps there is a better way? > > > >

Re: postgresql order lowercase before uppercase

2021-03-19 Thread Christian Ramseyer
On 19.03.21 10:12, basti wrote: > On 19.03.21 08:33, Laurenz Albe wrote: >> On Thu, 2021-03-18 at 23:51 +0100, basti wrote: >>> Am 18.03.21 um 17:19 schrieb Laurenz Albe: On Thu, 2021-03-18 at 15:39 +0100, basti wrote: > I need to as follow: > > ande > Amma > Anit >

Re: postgresql order lowercase before uppercase

2021-03-19 Thread basti
On 19.03.21 08:33, Laurenz Albe wrote: On Thu, 2021-03-18 at 23:51 +0100, basti wrote: Am 18.03.21 um 17:19 schrieb Laurenz Albe: On Thu, 2021-03-18 at 15:39 +0100, basti wrote: I need to as follow: ande Amma Anit Anti Brac Cali Create an ICU collation: CREATE COLLATION inv (PROVID

Re: postgresql order lowercase before uppercase

2021-03-19 Thread Laurenz Albe
On Thu, 2021-03-18 at 23:51 +0100, basti wrote: > Am 18.03.21 um 17:19 schrieb Laurenz Albe: > > On Thu, 2021-03-18 at 15:39 +0100, basti wrote: > > > I need to as follow: > > > > > > ande > > > Amma > > > Anit > > > Anti > > > Brac > > > Cali > > > > > > > Create an ICU collation: > > > >

Re: postgresql order lowercase before uppercase

2021-03-18 Thread basti
Am 18.03.21 um 17:19 schrieb Laurenz Albe: > 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 >

Re: postgresql order lowercase before uppercase

2021-03-18 Thread Laurenz Albe
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

Re: postgresql order lowercase before uppercase

2021-03-18 Thread Marc Millas
or, maybe, just nothing ? Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, Mar 18, 2021 at 4:44 PM Ron wrote: > Exactly. "C" collation is the opposite of what he wants. > > OP needs something like "de_DE". > > On 3/18/21 10:36 AM, Marc Millas wrote: > > to me, collate 'C' ask

Re: postgresql order lowercase before uppercase

2021-03-18 Thread Ron
Exactly.  "C" collation is the opposite of what he wants. OP needs something like "de_DE". On 3/18/21 10:36 AM, Marc Millas wrote: to me, collate 'C' ask for the raw ascii order which put caps before because the hexa coding is lower did you try any thing else (POSIX is same as 'C') Marc MILLA

Re: postgresql order lowercase before uppercase

2021-03-18 Thread Marc Millas
to me, collate 'C' ask for the raw ascii order which put caps before because the hexa coding is lower did you try any thing else (POSIX is same as 'C') Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, Mar 18, 2021 at 4:18 PM basti wrote: > This does not help in that case. > >

Re: postgresql order lowercase before uppercase

2021-03-18 Thread basti
This does not help in that case. On 18.03.21 15:45, Basques, Bob (CI-StPaul) wrote: Maybe check out using the UPPER/LOWER/INITCAP functions in the order by clause? Bobb -Original Message- From: basti Sent: Thursday, March 18, 2021 9:40 AM To: pgsql-gene...@postgresql.org Subject:

RE: postgresql order lowercase before uppercase

2021-03-18 Thread Basques, Bob (CI-StPaul)
Maybe check out using the UPPER/LOWER/INITCAP functions in the order by clause? Bobb > -Original Message- > From: basti > Sent: Thursday, March 18, 2021 9:40 AM > To: pgsql-gene...@postgresql.org > Subject: postgresql order lowercase before uppercase > > Think Before You Click: This