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