From: Craig Ringer <ringerc@ringerc.id.au>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6290: converting interval from weeks to days
Date: Fri, 11 Nov 2011 11:25:30 +0800
Message-ID: <4EBC95AA.9050407@ringerc.id.au> (raw)
In-Reply-To: <4EBC7BDD.3080609@hogranch.com>
References: <201111102115.pAALFOrw006489@wwwmaster.postgresql.org>
<4EBC7BDD.3080609@hogranch.com>
On 11/11/2011 09:35 AM, John R Pierce wrote:
> On 11/10/11 1:15 PM, Alexey Nalbat wrote:
>> => select '1000000000 weeks'::interval;
>> interval
>> ------------------
>> -1589934592 days
>
> a billion weeks is like 19 million years. somehow, I don't think that
> postgresql's date math has quite that range.
It should probably detect overflow and fail with an error like Pg does
with other overflow conditions, though. I think that was probably the point.
--
Craig Ringer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: ringerc@ringerc.id.au, pierce@hogranch.com
Subject: Re: BUG #6290: converting interval from weeks to days
In-Reply-To: <4EBC95AA.9050407@ringerc.id.au>
References: <201111102115.pAALFOrw006489@wwwmaster.postgresql.org> <4EBC7BDD.3080609@hogranch.com> <4EBC95AA.9050407@ringerc.id.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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