forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita711b36
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 parentf79cca5 commita711b36
File tree
3 files changed
+20
-17
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+20
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8290 | 8290 | | |
8291 | 8291 | | |
8292 | 8292 | | |
8293 | | - | |
| 8293 | + | |
8294 | 8294 | | |
8295 | 8295 | | |
8296 | 8296 | | |
8297 | | - | |
| 8297 | + | |
| 8298 | + | |
8298 | 8299 | | |
8299 | 8300 | | |
8300 | 8301 | | |
| |||
8342 | 8343 | | |
8343 | 8344 | | |
8344 | 8345 | | |
8345 | | - | |
| 8346 | + | |
8346 | 8347 | | |
8347 | 8348 | | |
8348 | 8349 | | |
8349 | | - | |
| 8350 | + | |
| 8351 | + | |
8350 | 8352 | | |
8351 | 8353 | | |
8352 | 8354 | | |
| |||
10117 | 10119 | | |
10118 | 10120 | | |
10119 | 10121 | | |
10120 | | - | |
| 10122 | + | |
| 10123 | + | |
10121 | 10124 | | |
10122 | | - | |
| 10125 | + | |
| 10126 | + | |
10123 | 10127 | | |
10124 | 10128 | | |
10125 | 10129 | | |
| |||
10171 | 10175 | | |
10172 | 10176 | | |
10173 | 10177 | | |
10174 | | - | |
10175 | | - | |
10176 | | - | |
| 10178 | + | |
| 10179 | + | |
| 10180 | + | |
| 10181 | + | |
10177 | 10182 | | |
10178 | 10183 | | |
10179 | 10184 | | |
| |||
10194 | 10199 | | |
10195 | 10200 | | |
10196 | 10201 | | |
10197 | | - | |
10198 | | - | |
10199 | | - | |
10200 | | - | |
10201 | | - | |
10202 | 10202 | | |
10203 | 10203 | | |
10204 | 10204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1922 | 1922 | | |
1923 | 1923 | | |
1924 | 1924 | | |
| 1925 | + | |
1925 | 1926 | | |
1926 | 1927 | | |
1927 | 1928 | | |
| |||
1944 | 1945 | | |
1945 | 1946 | | |
1946 | 1947 | | |
1947 | | - | |
| 1948 | + | |
| 1949 | + | |
1948 | 1950 | | |
1949 | | - | |
1950 | | - | |
| 1951 | + | |
| 1952 | + | |
1951 | 1953 | | |
1952 | 1954 | | |
1953 | 1955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
0 commit comments
Comments
(0)