forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1c8a7f6
committed
Remove internal uses of CTimeZone/HasCTZSet.
The only remaining places where we actually look at CTimeZone/HasCTZSetare abstime2tm() and timestamp2tm(). Now that session_timezone is alwaysvalid, we can remove these special cases. The caller-visible impact ofthis is that these functions now always return a valid zone abbreviationif requested, whereas before they'd return a NULL pointer if a brute-forcetimezone was in use. In the existing code, the only place I can find thatchanges behavior is to_char(), whose TZ format code will now printsomething useful rather than nothing for such zones. (In the places wherethe returned zone abbreviation is passed to EncodeDateTime, the lack ofvisible change is because we've chosen the abbreviation used for thesezones to match what EncodeTimezone would have printed.)It's likely that there is now a fair amount of removable dead code aroundthe call sites, namely anything that's meant to cope with getting a NULLtimezone abbreviation, but I've not made an effort to root that out.This could be back-patched if we decide we'd like to fix to_char()'sbehavior in the back branches, but there doesn't seem to be muchenthusiasm for that at present.1 parent631dc39 commit1c8a7f6
File tree
3 files changed
+9
-60
lines changed- src
- backend/utils/adt
- test/regress/expected
3 files changed
+9
-60
lines changedLines changed: 1 addition & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
| 103 | + | |
112 | 104 |
| |
113 | 105 |
| |
114 | 106 |
| |
| |||
126 | 118 |
| |
127 | 119 |
| |
128 | 120 |
| |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 | 121 |
| |
145 | 122 |
| |
146 | 123 |
| |
| |||
161 | 138 |
| |
162 | 139 |
| |
163 | 140 |
| |
164 |
| - | |
165 | 141 |
| |
166 | 142 |
| |
167 | 143 |
| |
|
Lines changed: 5 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1498 | 1498 |
| |
1499 | 1499 |
| |
1500 | 1500 |
| |
1501 |
| - | |
1502 |
| - | |
| 1501 | + | |
1503 | 1502 |
| |
1504 | 1503 |
| |
1505 | 1504 |
| |
| |||
1508 | 1507 |
| |
1509 | 1508 |
| |
1510 | 1509 |
| |
1511 |
| - | |
1512 |
| - | |
1513 |
| - | |
1514 |
| - | |
1515 |
| - | |
1516 |
| - | |
1517 |
| - | |
1518 |
| - | |
1519 |
| - | |
1520 |
| - | |
1521 |
| - | |
1522 |
| - | |
1523 |
| - | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
1524 | 1513 |
| |
1525 | 1514 |
| |
1526 | 1515 |
| |
| |||
1589 | 1578 |
| |
1590 | 1579 |
| |
1591 | 1580 |
| |
1592 |
| - | |
1593 |
| - | |
1594 |
| - | |
1595 |
| - | |
1596 |
| - | |
1597 |
| - | |
1598 |
| - | |
1599 |
| - | |
1600 |
| - | |
1601 |
| - | |
1602 |
| - | |
1603 |
| - | |
1604 |
| - | |
1605 |
| - | |
1606 |
| - | |
1607 | 1581 |
| |
1608 | 1582 |
| |
1609 | 1583 |
| |
| |||
1624 | 1598 |
| |
1625 | 1599 |
| |
1626 | 1600 |
| |
1627 |
| - | |
1628 |
| - | |
| 1601 | + | |
1629 | 1602 |
| |
1630 | 1603 |
| |
1631 | 1604 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2959 | 2959 |
| |
2960 | 2960 |
| |
2961 | 2961 |
| |
2962 |
| - | |
2963 |
| - | |
2964 |
| - | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
2965 | 2965 |
| |
2966 | 2966 |
| |
2967 | 2967 |
|
0 commit comments
Comments
(0)