Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Evan Jones <evan(dot)jones(at)datadoghq(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific
Date: 2023-10-10 23:34:33
Message-ID: ZSXfiSRfufOnnHwG@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 10, 2023 at 10:51:10AM -0400, Evan Jones wrote:
> Here is a quick demonstration of this issue, showing that the quoting
> behavior is different between these two. Mac OS X with the "default" locale
> includes quotes because ą includes 0x85 in its UTF-8 encoding:

Ugh. rowtypes.c has reminded me as well of gistfuncs.c in pageinspect
where included columns are printed in a ROW-like fashion. And it also
uses isspace() when we check if double quotes are needed or not. So
the use of the quotes would equally depend on what macos thinks is
a correct space in this case.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-10-10 23:40:28 Re: stopgap fix for signal handling during restore_command
Previous Message Andres Freund 2023-10-10 23:29:33 Re: Lowering the default wal_blocksize to 4K