From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | depesz(at)depesz(dot)com |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Bad interval conversion? |
Date: | 2009-08-18 16:04:13 |
Message-ID: | 34d269d40908180904w1c0bd66p45bd5f81830e82e6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Aug 18, 2009 at 06:00, hubert depesz
lubaczewski<depesz(at)depesz(dot)com> wrote:
> Hi,
> tried on latest 8.5, and some 8.3:
> # select '4817191.623 ms'::interval;
> interval
> ------------------
> -00:35:47.483648
> (1 row)
>
> I am pretty sure the answer is wrong. But why?
It only happens if you have integer date times on... seems to have
gotten introduced by
http://archives.postgresql.org/pgsql-committers/2008-03/msg00406.php
Im thinking the fact that fsec_t is now an int32 on INT64_TIMESTAMP
builds was a typo/thinko... its really supposed to be int64.
With the attached patch it works correctly and fails with 'out of
range' when its actually out of range.
Attachment | Content-Type | Size |
---|---|---|
fsec_to_int64.patch | text/x-patch | 501 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-18 16:22:27 | Re: BUG #4993: memory issue with array_agg |
Previous Message | Hiroshi Saito | 2009-08-18 14:24:32 | Re: BUG #4991: problem with ODBC driver 8.4 |