Commit 1a3efa1
committed
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
The test cases added by commit 26ae3aa exposed an old oversight in
timestamp[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 parent 26ae3aa commit 1a3efa1
File tree
3 files changed
+9
-2
lines changed- src
- backend/utils/adt
- test/regress/expected
3 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4373 | 4373 | | |
4374 | 4374 | | |
4375 | 4375 | | |
| 4376 | + | |
4376 | 4377 | | |
4377 | 4378 | | |
4378 | 4379 | | |
| |||
4647 | 4648 | | |
4648 | 4649 | | |
4649 | 4650 | | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
4650 | 4654 | | |
4651 | 4655 | | |
4652 | 4656 | | |
| |||
4843 | 4847 | | |
4844 | 4848 | | |
4845 | 4849 | | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
4846 | 4853 | | |
4847 | 4854 | | |
4848 | 4855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | | - | |
| 812 | + | |
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
921 | | - | |
| 921 | + | |
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
| |||
0 commit comments