Skip site navigation (1) Skip section navigation (2)

BUG #14479: Casting non-constant values to INTERVAL DAY TO MINUTE doesn't truncate the seconds field

From: email(at)piotr-stefaniak(dot)me
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14479: Casting non-constant values to INTERVAL DAY TO MINUTE doesn't truncate the seconds field
Date: 2016-12-27 17:23:07
Message-ID: 20161227172307.10135.7747@wrigleys.postgresql.org (view raw or whole thread)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14479
Logged by:          Piotr Stefaniak
Email address:      email(at)piotr-stefaniak(dot)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.


Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2016-12-27 18:12:48
Subject: Re: BUG #14479: Casting non-constant values to INTERVAL DAY TO MINUTE doesn't truncate the seconds field
Previous:From: Magnus HaganderDate: 2016-12-27 09:40:39
Subject: Re: pg_receivexlog creating holes in WAL (HEAD only)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group