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

Re: Why extract( ... from timestamp ) is not immutable?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Why extract( ... from timestamp ) is not immutable?
Date: 2012-01-25 15:48:34
Message-ID: 20120125154834.GC25970@depesz.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
On Wed, Jan 25, 2012 at 07:44:14AM -0800, Adrian Klaver wrote:
> > I thought that this is what I will achieve with extract(epoch from now()
> > at time zone 'UTC') but clearly it doesn't work.
> > So what options do I have?
> 
> Isn't extract(epoch from now()) getting what you want?

you can't make index on it.

Best regards,

depesz

-- 
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/

In response to

Responses

pgsql-hackers by date

Next:From: Marko KreenDate: 2012-01-25 15:53:45
Subject: Re: GUC_REPORT for protocol tunables was: Re: Optimize binary serialization format of arrays with fixed size elements
Previous:From: hubert depesz lubaczewskiDate: 2012-01-25 15:48:13
Subject: Re: Why extract( ... from timestamp ) is not immutable?

pgsql-general by date

Next:From: Adrian KlaverDate: 2012-01-25 16:06:42
Subject: Re: Why extract( ... from timestamp ) is not immutable?
Previous:From: hubert depesz lubaczewskiDate: 2012-01-25 15:48:13
Subject: Re: Why extract( ... from timestamp ) is not immutable?

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