diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-12-01 11:38:06 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-12-01 11:38:15 -0500 |
commit | a711b36e5b88e786f541b6c5671f28e997e68415 (patch) | |
tree | b7a8c8b31f6fc0af2d81b0a542a16581886924c9 /src/backend/executor/nodeFunctionscan.c | |
parent | f79cca5bfd2250c56e93f32a21bd3cd39be07724 (diff) | |
download | postgresql-a711b36e5b88e786f541b6c5671f28e997e68415.tar.gz postgresql-a711b36e5b88e786f541b6c5671f28e997e68415.zip |
Fix under-parenthesized display of AT TIME ZONE constructs.
In commit 40c24bfef, I forgot to use get_rule_expr_paren() for the
arguments of AT TIME ZONE, resulting in possibly not printing parens
for expressions that need it. But get_rule_expr_paren() wouldn't have
gotten it right anyway, because isSimpleNode() hadn't been taught that
COERCE_SQL_SYNTAX parent nodes don't guarantee sufficient parentheses.
Improve all that. Also use this methodology for F_IS_NORMALIZED, so
that we don't print useless parens for that.
In passing, remove a comment that was obsoleted later.
Per report from Duncan Sands. Back-patch to v14 where this code
came in. (Before that, we didn't try to print AT TIME ZONE that way,
so there was no bug just ugliness.)
Discussion: https://postgr.es/m/f41566aa-a057-6628-4b7c-b48770ecb84a@deepbluecap.com
Diffstat (limited to 'src/backend/executor/nodeFunctionscan.c')
0 files changed, 0 insertions, 0 deletions