pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/07c4b6ac7d6e467f9db681772b5d5101144fcfe7

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c965c42a53e998c1744e355291eff1975155ac7d

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/332584da9cfdbe91a651427a9fc3ed76dffaa529

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6e2ac8d66d58ccdda4dcccc52f8b6b7911db0ad2

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a3efa1eb67ab752231a6fff2743a77ae55808d5

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/323c47925af9e53c4c0476553e3e13a86f3d8173

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.
@ 2019-12-12 17:31  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-12 17:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6aa1263113a6aeeaf1a2405018bff50b4666134e

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 7 +++++++
src/test/regress/expected/timestamp.out   | 2 +-
src/test/regress/expected/timestamptz.out | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-12-12 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:31 pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox