Re: Built-in CTYPE provider

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Built-in CTYPE provider
Date: 2024-03-14 08:08:19
Message-ID: 3117d30aa911b408b90420f4f280fa0c3b5851be.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2024-03-13 at 00:44 -0700, Jeff Davis wrote:
> New series attached. I plan to commit 0001 very soon.

Committed the basic builtin provider, supporting only the "C" locale.

There were a few changes since the last version I posted:

* Added simplistic validation of the locale name to initdb.c (missing
before).
* Consistently passed the locale name to
get_collation_actual_version(). In the previous patch, the caller
sometimes just passed NULL knowing that the builtin provider is not
versioned, but that's not the caller's responsibility.
* pg_dump previously had some minor refactoring, which you had some
questions about. I eliminated that and just kept it to the changes
necessary for the builtin provider.
* createdb --help was missing the --builtin-locale option
* improved error checking order in createdb() to avoid a confusing
error message.

I also attached a rebased series.

0001 (the C.UTF-8 locale) is also close. Considering that most of the
infrastructure is already in place, that's not a large patch. You many
have some comments about the way I'm canonicalizing and validating in
initdb -- that could be cleaner, but it feels like I should refactor
the surrounding code separately first.

0002 (inlining utf8 functions) is also ready.

For 0003 and beyond, I'd like some validation that it's what you had in
mind.

Regards,
Jeff Davis

Attachment Content-Type Size
v24-0001-Support-C.UTF-8-locale-in-the-new-builtin-collat.patch text/x-patch 28.0 KB
v24-0002-Inline-basic-UTF-8-functions.patch text/x-patch 4.4 KB
v24-0003-Add-unicode_strtitle-for-Unicode-Default-Case-Co.patch text/x-patch 9.4 KB
v24-0004-Support-Unicode-full-case-mapping-and-conversion.patch text/x-patch 555.7 KB
v24-0005-Support-PG_UNICODE_FAST-locale-in-the-builtin-co.patch text/x-patch 18.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-03-14 08:14:50 Re: Have pg_basebackup write "dbname" in "primary_conninfo"?
Previous Message Michael Paquier 2024-03-14 08:06:31 Re: Support json_errdetail in FRONTEND builds