Re: Bug in jsonb_in function (14 & 15 version are affected)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikolay Shaplov <dhyan@nataraj.su>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-13T17:58:02Z
Lists: pgsql-hackers
Attachments
- fix-json-lex-string-error-cases.patch (text/x-diff) patch
Nikolay Shaplov <dhyan@nataraj.su> writes: > I found a bug in jsonb_in function (it converts json from sting representation > into jsonb internal representation). Yeah. Looks like json_lex_string is failing to honor the invariant that it needs to set token_terminator ... although the documentation of the function certainly isn't helping. I think we need the attached. A nice side benefit is that the error context reports get a lot more useful --- somebody should have inquired before as to why they were so bogus. regards, tom lane
Commits
-
Fix JSON error reporting for many cases of erroneous string values.
- c25a929a6c88 12.15 landed
- 74a1a36d755b 15.3 landed
- 52e9a781656e 13.11 landed
- 25a7812cd086 16.0 landed
- 234941a3bbf3 11.20 landed
- 0ee9d685dd80 14.8 landed