Re: Invalid "trailing junk" error message when non-English letters are used
Pavel Borisov <pashkin.elfe@gmail.com>
From: Pavel Borisov <pashkin.elfe@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Karina Litskevich <litskevichkarina@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-05T17:56:10Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Prevent mis-encoding of "trailing junk after numeric literal" errors.
- fadff3fc9459 18.0 landed
- f37ac613a835 15.9 landed
- 7dcbf0afa28c 17.0 landed
- 4fd4d7653e2c 16.5 landed
-
Reject trailing junk after numeric literals
- 2549f0661bd2 15.0 cited
On Thu, 5 Sept 2024 at 20:49, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Karina Litskevich <litskevichkarina@gmail.com> writes: > > On Thu, Sep 5, 2024 at 6:07 PM Karina Litskevich > > <litskevichkarina@gmail.com> wrote: > >> In v3 of the patch I grouped all the *_junk rules together and included > >> the suggested comment with a little added something. > > > Oops, I forgot to attach the patch, here it is. > > Pushed with a bit of further wordsmithing on the comment. > > I left out the proposed new test case "SELECT 1ä;". The trouble > with that is it'd introduce an encoding dependency into the test. > For example, it'd likely fail with some other error message in > a server encoding that lacks an equivalent to UTF8 "ä". While > we have methods for coping with such cases, it requires some > pushups, and I didn't see the value. The changes in existing > test case results are sufficient to show the patch does what > we want. > > Also, while the bug exists in v15, the patch didn't apply at all. > I got lazy and just did the minimal s/ident_start/identifier/ change > in that branch, instead of back-patching the cosmetic aspects. > Good! Thank you! Pavel