Re: roundoff problem in time datatype

From: Jochem van Dieten <jochemd(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: roundoff problem in time datatype
Date: 2005-09-26 15:16:41
Message-ID: f96a9b8305092608166df19fa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 9/26/05, Dennis Bjorklund wrote:
> On Sun, 25 Sep 2005, Tom Lane wrote:
>>
>> Alternatively: why are we forbidding the value 24:00:00 anyway? Is
>> there a reason not to allow the hours field to exceed 23?
>
> One reason is because it's what the standard demand.

Could you cite that? The only thing I can find in the SQL standard is
that the hour field in an INTERVAL can not exceed 23, not datetimes.

> Another is that it
> isn't a proper time, just like feb 31 isn't a proper date.

IIRC ISO 8601 (to whcih the SQL standard points) says
2005-10-01T24:00:00 is valid (and happens to be the same as
2005-10-02T00:00:00). It does seem a bit inconsistent with the spec of
an interval though.

Jochem

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michal Jeczalik 2005-09-26 15:32:54 Re: "expected authentication request from server, but
Previous Message Dave Page 2005-09-26 15:08:47 Re: Server process exited with unexpected status 128.

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-09-26 15:46:47 Re: roundoff problem in time datatype
Previous Message Greg Stark 2005-09-26 15:04:13 Re: roundoff problem in time datatype