Search Postgresql Archives

Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 16, 2012 at 3:56 PM, Craig Ringer <ringerc@xxxxxxxxxxxxx> wrote:
> On 07/16/2012 07:41 PM, Alban Hertroys wrote:
>>>>
>>>> BTW, that second value looks a whole lot like a poorly thought out

> Yup. The 'infinity' value doesn't play well with all database access APIs
> and languages, though.

It doesn't even play well with PostgreSQL's extract(). I reported it
some times ago but as of 9.1.4 it has not been fixed.

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

This makes 'infinity' a problematic choice in any application
requiring a mapping between dates and reals, such as when using
intervals in gist indexes.

-- Daniele

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux