From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | extract(epoch from infinity) is not 0 |
Date: | 2011-07-12 11:37:41 |
Message-ID: | CA+mi_8bda-Fnev9iXeUbnqhVaCWzbYhHkWoxPQfBca9eDPpRMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hello,
=# select extract(epoch from 'infinity'::timestamp);
date_part
-----------
0
A better value would be 'infinity'::float8. Ditto for -infinity.
I'm trying to use a box-based index to represent the intervals in a
table containing a pair of fields date_from, date_to (timestamps),
where semi-open intervals are represented with +/- infinity. Building
the boxes using extract(epoch from ...) creates wrong entries as
semi-open intervals are converted into a box with a corner in (0,0).
-- Daniele
From | Date | Subject | |
---|---|---|---|
Next Message | Sandro Santilli | 2011-07-12 13:18:11 | Ambiguos OPERATOR items in pg_restore manifest file (was: [postgis-devel] utils/new_postgis_restore.pl) |
Previous Message | Bernd Helmle | 2011-07-12 11:34:52 | Re: BUG #6113: SET DATESTYLE='European' does not set datestyle output correctly |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-07-12 12:15:22 | Re: dropping table in testcase alter_table.sql |
Previous Message | Radosław Smogura | 2011-07-12 10:57:59 | Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected |