pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove redundant function calls in timestamp[tz]_part().
7+ messages / 1 participants
[nested] [flat]

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/26ae3aa80e337261203ba4442452bed261ff9888

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/73355634959bc011508a24f0e344c6f6fddf419e

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7d233810a3a3b20460639253f5e38d4186cd350d

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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

* pgsql: Remove redundant function calls in timestamp[tz]_part().
@ 2019-12-12 17:13  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

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

Remove redundant function calls in timestamp[tz]_part().

The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully
redundant with the ones done just above the switch.  This evidently crept
in during commit 258ee1b63, which relocated that code from another place
where the calls were indeed needed.  Just delete the redundant calls.

I (tgl) noted that our test coverage of these functions left quite a
bit to be desired, so extend timestamp.sql and timestamptz.sql to
cover all the branches.

Back-patch to all supported branches, as the previous commit was.
There's no real issue here other than some wasted cycles in some
not-too-heavily-used code paths, but the test coverage seems valuable.

Report and patch by Li Japin; test case adjustments by me.

Discussion: https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8b0fd6d04137d8c436a34f3261a0f7fa3068f891

Modified Files
--------------
src/backend/utils/adt/timestamp.c         |  16 -
src/test/regress/expected/timestamp.out   | 469 +++++++++++++++----------
src/test/regress/expected/timestamptz.out | 551 ++++++++++++++++++++----------
src/test/regress/sql/timestamp.sql        |  23 +-
src/test/regress/sql/timestamptz.sql      |  29 +-
5 files changed, 693 insertions(+), 395 deletions(-)



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


end of thread, other threads:[~2019-12-12 17:13 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:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). Tom Lane <tgl@sss.pgh.pa.us>
2019-12-12 17:13 pgsql: Remove redundant function calls in timestamp[tz]_part(). 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