forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit55c3a04
committed
Fix assorted breakage in to_char()'s OF format option.
In HEAD, fix incorrect field width for hours part of OF when tm_gmtoff isnegative. This was introduced by commit2d87eed as a result offalsely applying a pattern that's correct when + signs are omitted, whichis not the case for OF.In 9.4, fix missing abs() call that allowed a sign to be attached to theminutes part of OF. This was fixed in 9.5 by9b43d73, but forinscrutable reasons not back-patched.In all three versions, ensure that the sign of tm_gmtoff is correctlyreported even when the GMT offset is less than 1 hour.Add regression tests, which evidently we desperately need here.Thomas Munro and Tom Lane, per report from David Fetter1 parentf4ceed6 commit55c3a04
File tree
3 files changed
+75
-4
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+75
-4
lines changedLines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2506 | 2506 |
| |
2507 | 2507 |
| |
2508 | 2508 |
| |
2509 |
| - | |
2510 |
| - | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
2511 | 2513 |
| |
2512 |
| - | |
| 2514 | + | |
2513 | 2515 |
| |
2514 |
| - | |
| 2516 | + | |
| 2517 | + | |
2515 | 2518 |
| |
2516 | 2519 |
| |
2517 | 2520 |
| |
|
Lines changed: 51 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1699 | 1699 |
| |
1700 | 1700 |
| |
1701 | 1701 |
| |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
1702 | 1753 |
| |
1703 | 1754 |
| |
1704 | 1755 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
248 | 248 |
| |
249 | 249 |
| |
250 | 250 |
| |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
251 | 268 |
| |
252 | 269 |
| |
253 | 270 |
| |
|
0 commit comments
Comments
(0)