BUG #14479: Casting non-constant values to INTERVAL DAY TO MINUTE doesn't truncate the seconds field
email@piotr-stefaniak.me
From: email@piotr-stefaniak.me
To: pgsql-bugs@postgresql.org
Date: 2016-12-27T17:23:07Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14479
Logged by: Piotr Stefaniak
Email address: email@piotr-stefaniak.me
PostgreSQL version: 9.4.10
Operating system: FreeBSD, probably irrelevant
Description:
# SELECT x.y::INTERVAL DAY TO MINUTE, (interval '02:47:15.375721')::INTERVAL
DAY TO MINUTE FROM (VALUES (interval '02:47:15.375721')) x (y);
y | interval
-----------------+----------
02:47:15.375721 | 02:47:00
I chose 9.4.10 as the version in the web form because that's what I have,
but Andrew Gierth has said that this is the behavior of versions: 9.2, 9.3,
and 9.4 but not versions 9.1, 9.5, and HEAD.
Commits
-
Fix interval_transform so it doesn't throw away non-no-op casts.
- beae7d5f0eae 9.2.20 landed
- f0774abde868 10.0 landed
- 58359983909a 9.3.16 landed
- 4efe7aa2d8df 9.5.6 landed
- 21e24eb9a082 9.6.2 landed
- 0b947b692c5e 9.4.11 landed