Re: BUG #6290: converting interval from weeks to days

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6290: converting interval from weeks to days
Date: 2011-11-11 03:25:30
Message-ID: 4EBC95AA.9050407@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Torsten Zuehlsdorff 2011-11-11 07:51:48 Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"
Previous Message Craig Ringer 2011-11-11 03:01:04 Re: BUG #6289: help us