Re: CREATE DATABASE command for non-libc providers

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CREATE DATABASE command for non-libc providers
Date: 2025-06-11 19:18:44
Message-ID: 4d8a8e2999408ca5ca8f92edde241214113060e2.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2025-06-11 19:24:24 Re: Safeguards against incorrect fd flags for fsync()
Previous Message Jeff Davis 2025-06-11 19:15:14 Re: Remaining dependency on setlocale()