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 1r3NG8-003PYq-7G for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 21:17:16 +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 1r3NG6-002kpp-Ex for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 21:17:14 +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 1r3NG6-002kph-5X for pgsql-hackers@lists.postgresql.org; Wed, 15 Nov 2023 21:17:14 +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 1r3NG3-006ceU-LP for pgsql-hackers@postgresql.org; Wed, 15 Nov 2023 21:17:13 +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 3AFLH8kM012843; Wed, 15 Nov 2023 16:17:08 -0500 From: Tom Lane To: Thomas Munro cc: Tristan Partin , pgsql-hackers Subject: Re: On non-Windows, hard depend on uselocale(3) In-reply-to: References: <2689177.1700070346@sss.pgh.pa.us> <2946058.1700081498@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Thu, 16 Nov 2023 10:08:12 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12841.1700083028.1@sss.pgh.pa.us> Date: Wed, 15 Nov 2023 16:17:08 -0500 Message-ID: <12842.1700083028@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > Currently pg_locale.c requires systems to have *either* uselocale() or > mbstowcs_l()/wcstombs_l(), but NetBSD satisfies the second > requirement. Check. > The other uses of uselocale() are in ECPG code that must > be falling back to the setlocale() path. In other words, isn't it the > case that we don't require uselocale() to compile ECPG stuff, but it'll > probably crash or corrupt itself or give wrong answers if you push it > on NetBSD, so... uhh, really we do require it? Dunno. mamba is getting through the ecpg regression tests okay, but we all know that doesn't prove a lot. (AFAICS, ecpg only cares about this to the extent of not wanting an LC_NUMERIC locale where the decimal point isn't '.'. I'm not sure that NetBSD supports any such locale anyway --- I think they're like OpenBSD in having only pro-forma locale support.) regards, tom lane