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: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2023-06-20T13:04:26Z
Lists: pgsql-hackers
Thanks for the detailed discussion. To confirm that I've understood everything: * Michael's proposed patch to add hstore_isspace() would be a potential fix: it resolves my original bug, and does not change the behavior of '\v'. * We believe the change to '\v' is not a problem, and may be an improvement because it now follows the "core" Postgres parser. In conclusion: we don't need to make an additional change. Thank you all for investigating! My one last suggestion: We *could* revert the backpatching if we are concerned about this change, but I'm not personally sure that is necessary. As we discussed, this is an unusual corner case in an "extension" type that many won't even have enabled. Evan On Tue, Jun 20, 2023 at 2:02 AM Michael Paquier <michael@paquier.xyz> wrote: > On Sun, Jun 18, 2023 at 09:10:59PM -0400, Tom Lane wrote: > > What have you got in mind? We should already have validated encoding > > correctness before the text ever gets to hstore_in, and I'm not clear > > what additional checks would be useful. > > I was staring at the hstore parsing code and got the impression that > multi-byte character handling could be improved, but looking closer it > seems that I got that wrong. Apologies for the noise. > -- > 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