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

Re: Interval->day proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Interval->day proposal
Date: 2005-06-01 14:27:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Michael Glaesemann <grzm(at)myrealbox(dot)com> writes:
> On Jun 1, 2005, at 1:42 PM, Michael Glaesemann wrote:
>> -- v8.0.3
>> test=# select '25 hours'::interval;
>> interval
>> ----------------
>> 1 day 01:00:00
>> (1 row)
>> -- new interval code
>> test=# select '25 hours'::interval;
>> interval
>> ----------
>> 25:00:00
>> (1 row)
>> I'll be digging into the spec later and post what I find. Thoughts?

> I've dug a bit, and this is definitely not spec compliant, as  
> interval hours must be in the range 0-23.

Doesn't bother me.  The spec says what results you must get from
spec-compliant input; I don't think it says we may take only
spec-compliant input.  (If we were to read it that way, we'd have
to rip out every PG extension, not only the interval-related ones.)

The entire *point* of this change is to be able to distinguish
"25 hours" from "1 day 1 hour", so you can hardly argue that being
able to do that is not what we want it to do...

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-06-01 14:31:07
Subject: Re: Interval->day proposal
Previous:From: Brusser, MichaelDate: 2005-06-01 14:27:04
Subject: fdatasync failed, I/O error

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