Re: insensitive collations

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: insensitive collations
Date: 2019-01-06 01:06:40
Message-ID: a57e4005-00a6-66cb-c2a1-c98c019f3de2@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/01/2019 17:05, Daniel Verite wrote:
> When using GROUP BY and ORDER BY on a field with a non-deterministic
> collation, this pops out:
>
> CREATE COLLATION myfr (locale='fr-u-ks-level1',
> provider='icu', deterministic=false);
>
> =# select n from (values ('été' collate "myfr"), ('ete')) x(n)
> group by 1 order by 1 ;
> n
> -----
> ete
> (1 row)
>
> =# select n from (values ('été' collate "myfr"), ('ete')) x(n)
> group by 1 order by 1 desc;
> n
> -----
> été
> (1 row)

I don't see anything wrong here. The collation says that both values
are equal, so which one is returned is implementation-dependent.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-01-06 03:17:34 Re: "SELECT ... FROM DUAL" is not quite as silly as it appears
Previous Message Peter Eisentraut 2019-01-06 00:51:08 Re: [patch] de.po REINDEX error