pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Andreas Karlsson <andreas@proxel.se>
To: Joe Conway <mail@joeconway.com>
To: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Remaining dependency on setlocale()
Date: Fri, 09 Aug 2024 11:24:03 -0700
Message-ID: <acd8ab2e5b313e7dd8942cc24eb738950d6589f2.camel@j-davis.com> (raw)
In-Reply-To: <fc61c88f-ab78-4870-ada6-e915e9dc7a19@proxel.se>
References: <4c5da86af36a0d5e430eee3f60ce5e06f1b5cd34.camel@j-davis.com>
	<1841102.1722982989@sss.pgh.pa.us>
	<CA+hUKGK7qKDHgoh1HuvMhtcpAwwVBA5BDt33vCzYYqCLfQTtzw@mail.gmail.com>
	<5b169990d1f602c3aa778a27f8516032ed899c99.camel@j-davis.com>
	<57a3f214-41bc-4954-ac09-8eae039137e8@joeconway.com>
	<45fcc802c66fdf52f4420b8cbe09e4fe26cd84fe.camel@j-davis.com>
	<fc61c88f-ab78-4870-ada6-e915e9dc7a19@proxel.se>

On Fri, 2024-08-09 at 13:41 +0200, Andreas Karlsson wrote:
> I am leaning towards that we should write our own pure ascii
> functions 
> for this.

That makes sense for a lot of call sites, but it could cause breakage
if we aren't careful.

>  Since we do not support any non-ascii compatible encodings 
> anyway I do not see the point in having locale support in most of
> these 
> call-sites.

An ascii-compatible encoding just means that the code points in the
ascii range are represented as ascii. I'm not clear on whether code
points in the ascii range can return different results for things like
isspace(), but it sounds plausible -- toupper() can return different
results for 'i' in tr_TR.

Also, what about the values outside 128-255, which are still valid
input to isspace()?

Regards,
	Jeff Davis






view thread (96+ messages)  latest in thread

Message-ID: <acd8ab2e5b313e7dd8942cc24eb738950d6589f2.camel@j-davis.com>
Permalink:  ../acd8ab2e5b313e7dd8942cc24eb738950d6589f2.camel@j-davis.com/
Also on:    postgresql.org/message-id/acd8ab2e5b313e7dd8942cc24eb738950d6589f2.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, andreas@proxel.se, mail@joeconway.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Remaining dependency on setlocale()
  In-Reply-To: <acd8ab2e5b313e7dd8942cc24eb738950d6589f2.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox