forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitde0ff60
committed
Fix under-parenthesized display of AT TIME ZONE constructs.
In commit40c24bf, I forgot to use get_rule_expr_paren() for thearguments of AT TIME ZONE, resulting in possibly not printing parensfor expressions that need it. But get_rule_expr_paren() wouldn't havegotten it right anyway, because isSimpleNode() hadn't been taught thatCOERCE_SQL_SYNTAX parent nodes don't guarantee sufficient parentheses.Improve all that. Also use this methodology for F_IS_NORMALIZED, sothat 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 codecame 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 parentcf9bcb0 commitde0ff60
File tree
3 files changed
+20
-17
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+20
-17
lines changedLines changed: 14 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8189 | 8189 |
| |
8190 | 8190 |
| |
8191 | 8191 |
| |
8192 |
| - | |
| 8192 | + | |
8193 | 8193 |
| |
8194 | 8194 |
| |
8195 | 8195 |
| |
8196 |
| - | |
| 8196 | + | |
| 8197 | + | |
8197 | 8198 |
| |
8198 | 8199 |
| |
8199 | 8200 |
| |
| |||
8241 | 8242 |
| |
8242 | 8243 |
| |
8243 | 8244 |
| |
8244 |
| - | |
| 8245 | + | |
8245 | 8246 |
| |
8246 | 8247 |
| |
8247 | 8248 |
| |
8248 |
| - | |
| 8249 | + | |
| 8250 | + | |
8249 | 8251 |
| |
8250 | 8252 |
| |
8251 | 8253 |
| |
| |||
10017 | 10019 |
| |
10018 | 10020 |
| |
10019 | 10021 |
| |
10020 |
| - | |
| 10022 | + | |
| 10023 | + | |
10021 | 10024 |
| |
10022 |
| - | |
| 10025 | + | |
| 10026 | + | |
10023 | 10027 |
| |
10024 | 10028 |
| |
10025 | 10029 |
| |
| |||
10071 | 10075 |
| |
10072 | 10076 |
| |
10073 | 10077 |
| |
10074 |
| - | |
10075 |
| - | |
10076 |
| - | |
| 10078 | + | |
| 10079 | + | |
| 10080 | + | |
| 10081 | + | |
10077 | 10082 |
| |
10078 | 10083 |
| |
10079 | 10084 |
| |
| |||
10094 | 10099 |
| |
10095 | 10100 |
| |
10096 | 10101 |
| |
10097 |
| - | |
10098 |
| - | |
10099 |
| - | |
10100 |
| - | |
10101 |
| - | |
10102 | 10102 |
| |
10103 | 10103 |
| |
10104 | 10104 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1790 | 1790 |
| |
1791 | 1791 |
| |
1792 | 1792 |
| |
| 1793 | + | |
1793 | 1794 |
| |
1794 | 1795 |
| |
1795 | 1796 |
| |
| |||
1812 | 1813 |
| |
1813 | 1814 |
| |
1814 | 1815 |
| |
1815 |
| - | |
| 1816 | + | |
| 1817 | + | |
1816 | 1818 |
| |
1817 |
| - | |
1818 |
| - | |
| 1819 | + | |
| 1820 | + | |
1819 | 1821 |
| |
1820 | 1822 |
| |
1821 | 1823 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
608 | 608 |
| |
609 | 609 |
| |
610 | 610 |
| |
| 611 | + | |
611 | 612 |
| |
612 | 613 |
| |
613 | 614 |
| |
|
0 commit comments
Comments
(0)