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: Evan Jones <evan.jones@datadoghq.com>
Cc: pgsql-hackers@postgresql.org
Date: 2023-06-06T11:37:45Z
Lists: pgsql-hackers
On Mon, Jun 05, 2023 at 11:26:56AM -0400, Evan Jones wrote: > This patch fixes a rare parsing bug with unicode characters on Mac OS X. > The problem is that isspace() on Mac OS X changes its behaviour with the > locale. Use scanner_isspace instead, which only returns true for ASCII > whitespace. It appears other places in the Postgres code have already run > into this, since a number of places use scanner_isspace instead. However, > there are still a lot of other calls to isspace(). I'll try to take a quick > look to see if there might be other instances of this bug. Indeed. It looks like 9ae2661 missed this spot. -- Michael
Commits
-
CREATE DATABASE: make LOCALE apply to all collation providers.
- a14e75eb0b6a 16.0 cited
-
hstore: Tighten key/value parsing check for whitespaces
- bbfc26d861fa 11.21 landed
- edf1de65e529 12.16 landed
- 78bf0a256d12 13.12 landed
- e0e6829459b0 14.9 landed
- 3a5222a432be 15.4 landed
- d522b05c8c1c 16.0 landed
-
Tighten checks for whitespace in functions that parse identifiers etc.
- 9ae2661fe1fe 10.0 cited