Commit fe1a7e1
Fix under-parenthesized display of AT TIME ZONE constructs.
In commit 40c24bf, 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.com1 parent 2963d35 commit fe1a7e1
3 files changed
Lines changed: 20 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8304 | 8304 | | |
8305 | 8305 | | |
8306 | 8306 | | |
8307 | | - | |
| 8307 | + | |
8308 | 8308 | | |
8309 | 8309 | | |
8310 | 8310 | | |
8311 | | - | |
| 8311 | + | |
| 8312 | + | |
8312 | 8313 | | |
8313 | 8314 | | |
8314 | 8315 | | |
| |||
8356 | 8357 | | |
8357 | 8358 | | |
8358 | 8359 | | |
8359 | | - | |
| 8360 | + | |
8360 | 8361 | | |
8361 | 8362 | | |
8362 | 8363 | | |
8363 | | - | |
| 8364 | + | |
| 8365 | + | |
8364 | 8366 | | |
8365 | 8367 | | |
8366 | 8368 | | |
| |||
10432 | 10434 | | |
10433 | 10435 | | |
10434 | 10436 | | |
10435 | | - | |
| 10437 | + | |
| 10438 | + | |
10436 | 10439 | | |
10437 | | - | |
| 10440 | + | |
| 10441 | + | |
10438 | 10442 | | |
10439 | 10443 | | |
10440 | 10444 | | |
| |||
10486 | 10490 | | |
10487 | 10491 | | |
10488 | 10492 | | |
10489 | | - | |
10490 | | - | |
10491 | | - | |
| 10493 | + | |
| 10494 | + | |
| 10495 | + | |
| 10496 | + | |
10492 | 10497 | | |
10493 | 10498 | | |
10494 | 10499 | | |
| |||
10509 | 10514 | | |
10510 | 10515 | | |
10511 | 10516 | | |
10512 | | - | |
10513 | | - | |
10514 | | - | |
10515 | | - | |
10516 | | - | |
10517 | 10517 | | |
10518 | 10518 | | |
10519 | 10519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1797 | 1797 | | |
1798 | 1798 | | |
1799 | 1799 | | |
| 1800 | + | |
1800 | 1801 | | |
1801 | 1802 | | |
1802 | 1803 | | |
| |||
1819 | 1820 | | |
1820 | 1821 | | |
1821 | 1822 | | |
1822 | | - | |
| 1823 | + | |
| 1824 | + | |
1823 | 1825 | | |
1824 | | - | |
1825 | | - | |
| 1826 | + | |
| 1827 | + | |
1826 | 1828 | | |
1827 | 1829 | | |
1828 | 1830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
| |||
0 commit comments