Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3lRV-005e86-66 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Nov 2023 23:06:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r3lRT-009uEe-Hw for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Nov 2023 23:06:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3lRT-009uEW-88 for pgsql-hackers@lists.postgresql.org; Thu, 16 Nov 2023 23:06:35 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3lRQ-006oIt-Vi for pgsql-hackers@lists.postgresql.org; Thu, 16 Nov 2023 23:06:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3AGN6Und450045; Thu, 16 Nov 2023 18:06:30 -0500 From: Tom Lane To: Nathan Bossart cc: Jubilee Young , pgsql-hackers@lists.postgresql.org, John Naylor Subject: Re: Hide exposed impl detail of wchar.c In-reply-to: <20231116225402.GA2882846@nathanxps13> References: <20231116225402.GA2882846@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Thu, 16 Nov 2023 16:54:02 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <450043.1700175990.1@sss.pgh.pa.us> Date: Thu, 16 Nov 2023 18:06:30 -0500 Message-ID: <450044.1700175990@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart 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