Re: Hide exposed impl detail of wchar.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hide exposed impl detail of wchar.c
Date
Msg-id 450044.1700175990@sss.pgh.pa.us
Whole thread Raw
In response to Re: Hide exposed impl detail of wchar.c  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Hide exposed impl detail of wchar.c
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> It looks like is_valid_ascii() was originally added to pg_wchar.h so that
> it could easily be used elsewhere [0] [1], but that doesn't seem to have
> happened yet.

It seems to be new as of v15, so there wouldn't have been a lot of time
for external code to adopt it.  As far as I can tell from Debian Code
Search, nobody has yet.

> Would moving this definition to a separate header file be a viable option?
> That'd still break any existing projects that are using it, but at least
> there'd be an easy fix.

That would provide a little bit of cover, at least, compared to just
hiding it in the .c file.

I'm generally sympathetic to the idea that simd.h was a rather large
dependency to add to something as widely used as pg_wchar.h.  So I'd
favor getting it out of there just on compilation-time grounds,
independently of whether it's causing active problems.  That argument
wouldn't justify a back-patch, but "it's causing problems" might.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Hide exposed impl detail of wchar.c
Next
From: shihao zhong
Date:
Subject: Re: EXCLUDE COLLATE in CREATE/ALTER TABLE document