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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-hackers by date

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