pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix extract epoch from interval calculation 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix extract epoch from interval calculation @ 2022-04-19 19:12 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2022-04-19 19:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix extract epoch from interval calculation The new numeric code for extract epoch from interval accidentally truncated the DAYS_PER_YEAR value to an integer, leading to results that mismatched the floating-point interval_part calculations. The commit a2da77cdb4661826482ebf2ddba1f953bc74afe4 that introduced this actually contains the regression test change that this reverts. I suppose this was missed at the time. Reported-by: Joseph Koshakow <koshy44@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/CAAvxfHd5n%3D13NYA2q_tUq%3D3%3DSuWU-CufmTf-Ozj%3DfrEgt7pX... Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f2a2bf66c87e14f07aefe23cbbe2f2d9edcd9734 Modified Files -------------- src/backend/utils/adt/timestamp.c | 14 ++++++++++---- src/test/regress/expected/interval.out | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix extract epoch from interval calculation @ 2022-04-19 19:12 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2022-04-19 19:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix extract epoch from interval calculation The new numeric code for extract epoch from interval accidentally truncated the DAYS_PER_YEAR value to an integer, leading to results that mismatched the floating-point interval_part calculations. The commit a2da77cdb4661826482ebf2ddba1f953bc74afe4 that introduced this actually contains the regression test change that this reverts. I suppose this was missed at the time. Reported-by: Joseph Koshakow <koshy44@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/CAAvxfHd5n%3D13NYA2q_tUq%3D3%3DSuWU-CufmTf-Ozj%3DfrEgt7pX... Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7a8d8219ccbf0963f2171ea23e1616ee6a7823ba Modified Files -------------- src/backend/utils/adt/timestamp.c | 14 ++++++++++---- src/test/regress/expected/interval.out | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-04-19 19:12 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-04-19 19:12 pgsql: Fix extract epoch from interval calculation Peter Eisentraut <peter@eisentraut.org> 2022-04-19 19:12 pgsql: Fix extract epoch from interval calculation Peter Eisentraut <peter@eisentraut.org>
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