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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Evan Jones <evan.jones@datadoghq.com>, pgsql-hackers@postgresql.org
Date: 2023-06-18T23:28:43Z
Lists: pgsql-hackers
On Sun, Jun 18, 2023 at 12:38:12PM -0400, Tom Lane wrote:
> FWIW, I think the status quo is fine.  Having hstore do something that
> is neither its historical behavior nor aligned with the core parser
> doesn't seem like a great idea.

Okay.  Fine by me.

> I don't buy this argument that
> somebody might be depending on the handling of \v in particular.  It's
> not any stronger than the argument that they might be depending on,
> say, recognizing no-break space (0xA0) in LATIN1, which the old code
> did (probably, depending on platform) and scanner_isspace will not.

Another thing that I was wondering, though..  Do you think that there
would be an argument in being stricter in the hstore code regarding
the handling of multi-byte characters with some checks based on
IS_HIGHBIT_SET() when parsing the keys and values?
--
Michael

Commits

  1. CREATE DATABASE: make LOCALE apply to all collation providers.

  2. hstore: Tighten key/value parsing check for whitespaces

  3. Tighten checks for whitespace in functions that parse identifiers etc.