Re: CREATE DATABASE command for non-libc providers

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: pgsql-hackers@postgresql.org
Date: 2025-06-11T19:18:44Z
Lists: pgsql-hackers
On Tue, 2025-06-10 at 23:44 +0200, Daniel Verite wrote:
> I may miss something, but I don't see a
> technical reason why this code could not be taught to call the
> equivalent
> functions of the current collation provider, following the same
> principles
> as the regex code.

The main challenge is backwards compatibility. Users of FTS would need
to recreate all of their tsvectors and indexes dependent on them. It's
even possible that some users only have tsvectors and don't store the
original data in the database, which would further complicate matters.

We could try to create a GUC to control this behavior, but behavior-
changing GUCs don't have a great history, and it would probably last
quite some time before we could really turn off libc for good.

There would be similar challenges for downcase_identifier() and maybe
pg_strcasecmp().

Regards,
	Jeff Davis




Commits

  1. Improve CREATE DATABASE error message for invalid libc locale.

  2. Fix support of digits in email/hostnames.

  3. Modify the built-in text search parser to handle URLs more nearly according