git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 26ae3aa) | patch
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
2019年12月12日 17:30:43 +0000 (12:30 -0500)
2019年12月12日 17:30:43 +0000 (12:30 -0500)
commit 1a3efa1eb67ab752231a6fff2743a77ae55808d5
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

The test cases added by commit 26ae3aa80 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.com
src/backend/utils/adt/timestamp.c diff | blob | blame | history
src/test/regress/expected/timestamp.out diff | blob | blame | history
src/test/regress/expected/timestamptz.out diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /