Re: Add standard collation UNICODE

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Jeff Davis <pgsql@j-davis.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-09T10:21:25Z
Lists: pgsql-hackers

Attachments

On 08.03.23 19:25, Jeff Davis wrote:
> Why is "unicode" only provided for the UTF-8 encoding? For "ucs_basic"
> that makes some sense, because the implementation only works in UTF-8.
> But here we are using ICU, and the "und" locale should work for any
> ICU-supported encoding. I suggest that we use collencoding=-1 for
> "unicode", and the docs can just add a note next to "ucs_basic" that it
> only works for UTF-8, because that's the weird case.

make sense

> For the docs, I suggest that you clarify that "ucs_basic" has the same
> behavior as the C locale does *in the UTF-8 encoding*. Not all users
> might pick up on the subtlety that the C locale has different behaviors
> in different encodings.

Ok, word-smithed a bit more.

How about this patch version?

Commits

  1. initdb: Set collversion for standard collation UNICODE

  2. Add standard collation UNICODE