Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific
Evan Jones <evan.jones@datadoghq.com>
From: Evan Jones <evan.jones@datadoghq.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@postgresql.org
Date: 2023-06-06T14:16:09Z
Lists: pgsql-hackers
On Tue, Jun 6, 2023 at 7:37 AM Michael Paquier <michael@paquier.xyz> wrote: > Indeed. It looks like 9ae2661 missed this spot. > I didn't think to look for a previous fix, thanks for finding this commit id! I did a quick look at the places found with "git grep isspace" yesterday. I agree with the comment from commit 9ae2661: "I've left alone isspace() calls in places that aren't really expecting any non-ASCII input characters, such as float8in()." There are a number of other calls where I think it would likely be safe, and possibly even a good idea, to replace isspace() with scanner_isspace(). However, I couldn't find any where I could cause a bug like the one I hit in hstore parsing. Original mailing list post for commit 9ae2661 in case it is helpful for others: https://www.postgresql.org/message-id/10129.1495302480@sss.pgh.pa.us
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