pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6290: converting interval from weeks to days
3+ messages / 3 participants
[nested] [flat]

* BUG #6290: converting interval from weeks to days
@ 2011-11-10 21:15 Alexey Nalbat <alexey_nalbat@hotbox.ru>
  2011-11-11 01:35 ` Re: BUG #6290: converting interval from weeks to days John R Pierce <pierce@hogranch.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Alexey Nalbat @ 2011-11-10 21:15 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      6290
Logged by:          Alexey Nalbat
Email address:      alexey_nalbat@hotbox.ru
PostgreSQL version: 9.1.1
Operating system:   Ubuntu
Description:        converting interval from weeks to days
Details: 

=> select '1000000000 weeks'::interval;
     interval     
------------------
 -1589934592 days
(1 row)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #6290: converting interval from weeks to days
  2011-11-10 21:15 BUG #6290: converting interval from weeks to days Alexey Nalbat <alexey_nalbat@hotbox.ru>
@ 2011-11-11 01:35 ` John R Pierce <pierce@hogranch.com>
  2011-11-11 03:25   ` Re: BUG #6290: converting interval from weeks to days Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 1 reply; 3+ messages in thread

From: John R Pierce @ 2011-11-11 01:35 UTC (permalink / raw)
  To: pgsql-bugs

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.


-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #6290: converting interval from weeks to days
  2011-11-10 21:15 BUG #6290: converting interval from weeks to days Alexey Nalbat <alexey_nalbat@hotbox.ru>
  2011-11-11 01:35 ` Re: BUG #6290: converting interval from weeks to days John R Pierce <pierce@hogranch.com>
@ 2011-11-11 03:25   ` Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 0 replies; 3+ messages in thread

From: Craig Ringer @ 2011-11-11 03:25 UTC (permalink / raw)
  To: John R Pierce <pierce@hogranch.com>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-11-11 03:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-10 21:15 BUG #6290: converting interval from weeks to days Alexey Nalbat <alexey_nalbat@hotbox.ru>
2011-11-11 01:35 ` John R Pierce <pierce@hogranch.com>
2011-11-11 03:25   ` Craig Ringer <ringerc@ringerc.id.au>

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