Re: Nondeterministic collations and the value returned by GROUP BY x

From: Jim Finnerty <jfinnert(at)amazon(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Nondeterministic collations and the value returned by GROUP BY x
Date: 2021-03-16 13:33:34
Message-ID: 1615901614848-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

right. It doesn't matter which of the values is returned; however, a
plausible-sounding implementation would case-fold the value, like GROUP BY
LOWER(x), but the case-folded value isn't necessarily one of the original
values and so that could be subtly wrong in the case-insensitive case, and
could in principle be completely wrong in the most general nondeterministic
collation case where the case-folded value isn't even equal to the other
members of the set.

does the implementation in PG12 ensure that some member of the set of equal
values is chosen as the representative value?

-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-03-16 13:37:56 Re: simplifying foreign key/RI checks
Previous Message Dilip Kumar 2021-03-16 13:05:21 Re: [HACKERS] Custom compression methods