pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: insensitive collations
Date: Sun, 6 Jan 2019 02:06:40 +0100
Message-ID: <a57e4005-00a6-66cb-c2a1-c98c019f3de2@2ndquadrant.com> (raw)
In-Reply-To: <eab7bd7b-7b2b-47f6-85b9-493e9d8cd834@manitou-mail.org>
References: <eab7bd7b-7b2b-47f6-85b9-493e9d8cd834@manitou-mail.org>

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




view thread (44+ messages)  latest in thread

Message-ID: <a57e4005-00a6-66cb-c2a1-c98c019f3de2@2ndquadrant.com>
Permalink:  ../a57e4005-00a6-66cb-c2a1-c98c019f3de2@2ndquadrant.com/
Also on:    postgresql.org/message-id/a57e4005-00a6-66cb-c2a1-c98c019f3de2@2ndquadrant.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, daniel@manitou-mail.org
  Subject: Re: insensitive collations
  In-Reply-To: <a57e4005-00a6-66cb-c2a1-c98c019f3de2@2ndquadrant.com>

* 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