Re: Add standard collation UNICODE

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add standard collation UNICODE
Date: 2023-03-04 19:27:03
Message-ID: CA+hUKGKZEDiXeGFcPw2GAGxdPCr2L+9yPdWeHvS3v+C9ipgpKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 5, 2023 at 7:30 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> Sorting by codepoint should be encoding-independent (i.e. decode to
> codepoint first); but the C collation is just strcmp, which is
> encoding-dependent. So is UCS_BASIC wrong today?

It's created for UTF-8 only, and UTF-8 sorts the same way as the
encoded code points, when interpreted as a sequence of unsigned char
by memcmp(), strcmp() etc. Seems right?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joseph Koshakow 2023-03-04 19:32:18 Re: Date-time extraneous fields with reserved keywords
Previous Message Tom Lane 2023-03-04 19:18:13 Re: [Proposal] Allow pg_dump to include all child tables with the root table