Skip site navigation (1) Skip section navigation (2)

extract(epoch from infinity) is not 0

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers

=# select extract(epoch from 'infinity'::timestamp);

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


pgsql-hackers by date

Next:From: Robert HaasDate: 2011-07-12 12:15:22
Subject: Re: dropping table in testcase alter_table.sql
Previous:From: Radosław SmoguraDate: 2011-07-12 10:57:59
Subject: Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected

pgsql-bugs by date

Next:From: Sandro SantilliDate: 2011-07-12 13:18:11
Subject: Ambiguos OPERATOR items in pg_restore manifest file (was: [postgis-devel] utils/
Previous:From: Bernd HelmleDate: 2011-07-12 11:34:52
Subject: Re: BUG #6113: SET DATESTYLE='European' does not set datestyle output correctly

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group