forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc965c42
committed
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
The test cases added by commit26ae3aa exposed an old oversight intimestamp[tz]_part: they didn't correct the result of date2isoyear()for BC years, so that we produced an off-by-one answer for such years.Fix that, and back-patch to all supported branches.Discussion:https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com1 parentf3cf330 commitc965c42
File tree
3 files changed
+9
-2
lines changed- src
- backend/utils/adt
- test/regress/expected
3 files changed
+9
-2
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4125 | 4125 |
| |
4126 | 4126 |
| |
4127 | 4127 |
| |
| 4128 | + | |
4128 | 4129 |
| |
4129 | 4130 |
| |
4130 | 4131 |
| |
| |||
4399 | 4400 |
| |
4400 | 4401 |
| |
4401 | 4402 |
| |
| 4403 | + | |
| 4404 | + | |
| 4405 | + | |
4402 | 4406 |
| |
4403 | 4407 |
| |
4404 | 4408 |
| |
| |||
4595 | 4599 |
| |
4596 | 4600 |
| |
4597 | 4601 |
| |
| 4602 | + | |
| 4603 | + | |
| 4604 | + | |
4598 | 4605 |
| |
4599 | 4606 |
| |
4600 | 4607 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
822 | 822 |
| |
823 | 823 |
| |
824 | 824 |
| |
825 |
| - | |
| 825 | + | |
826 | 826 |
| |
827 | 827 |
| |
828 | 828 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
913 | 913 |
| |
914 | 914 |
| |
915 | 915 |
| |
916 |
| - | |
| 916 | + | |
917 | 917 |
| |
918 | 918 |
| |
919 | 919 |
| |
|
0 commit comments
Comments
(0)