Re: pg_collation.collversion for C.UTF-8

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_collation.collversion for C.UTF-8
Date: 2023-06-06 19:27:19
Message-ID: c66f568a-2e7f-7fc3-9827-3e981e4a66bd@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/6/23 15:23, Jeff Davis wrote:
> On Mon, 2023-06-05 at 19:43 +0200, Daniel Verite wrote:
>> But in the meantime, personally I don't quite see why Postgres should
>> start forcing C.UTF-8 to sort differently in the database than in the
>> OS.
>
> I can see both points of view. It could be surprising to users if
> C.UTF-8 does not sort like C/memcmp, or surprising if it changes out
> from under them. It could also be surprising that it wouldn't sort like
> the current OS's libc interpretation of C.UTF-8.
>
> What about ICU? How should provider=icu locale=C.UTF-8 behave? We
> could:
>
> a. Just pass it to the provider and see what happens (older versions of
> ICU would interpret it as en-US-u-va-posix; newer versions would give
> the root locale).
>
> b. Consistently interpret it as en-US-u-va-posix.
>
> c. Don't pass it to the provider at all and treat it with memcmp
> semantics.

Personally I think this should be (a). However we should also clearly
document that the semantics of such is provider/OS dependent and
therefore may not be what is expected/desired.

--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-06-06 19:30:02 Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""
Previous Message Tom Lane 2023-06-06 19:25:26 Re: Order changes in PG16 since ICU introduction