diff options
author | Álvaro Herrera | 2025-06-12 12:21:21 +0000 |
---|---|---|
committer | Álvaro Herrera | 2025-06-12 12:21:21 +0000 |
commit | 0f65f3eec478db8ac4f217a608b4478fed023bac (patch) | |
tree | b792a68d36cd2e559c3e579214833a9348ab16f9 /src/bin/psql/help.c | |
parent | f7b11414e939a00faa63e27feae69ceef5bf4b02 (diff) |
The algorithm to squash lists of constants added by commit 62d712ecfd94
was a bit too simplistic; we wanted to avoid adding unnecessary
complexity, but cases like direct function calls of typecasting
functions (and others) were missed, and bogus SQL syntax was being shown
in pg_stat_statements normalized query text field. To fix normalization
for those cases, we need the parser to transmit information about were
each list of constant values starts and ends, so add that to a couple of
nodes. Also add a few more test cases to make sure we're doing the
right thing.
The patch initially submitted by Sami added a new private struct in
gram.y to carry the start/end information for A_Expr, but I (Álvaro)
decided that a better fix was to remove the parser indirection via the
in_expr production, and instead create separate components in the a_expr
rule. I'm surprised that this works and doesn't require more changes,
but I assume (without checking) that the grammar used to be more complex
and got simplified at some point.
Bump catversion.
Author: Sami Imseih <samimseih@gmail.com>
Author: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAA5RZ0tRXoPG2y6bMgBCWNDt0Tn=unRerbzYM=oW0syi1=C1OA@mail.gmail.com
Diffstat (limited to 'src/bin/psql/help.c')
0 files changed, 0 insertions, 0 deletions