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

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why extract( ... from timestamp ) is not immutable?
Date: 2012-02-06 11:14:30
Message-ID: jgocmm$l1j$8@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 2012-01-25, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On Wednesday, January 25, 2012 7:48:34 am hubert depesz lubaczewski wrote:
>> 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.
>
> I am afraid I am not following. So you can make an index on?:
>
> extract(epoch from now() at time zone 'UTC')

that one gets you the wrong result.

--
⚂⚃ 100% natural

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2012-02-06 11:23:45 Re: Error while importing CSV file
Previous Message Jasen Betts 2012-02-06 11:13:08 Re: Why extract( ... from timestamp ) is not immutable?

Browse pgsql-hackers by date

  From Date Subject
Next Message Lionel Elie Mamane 2012-02-06 14:31:11 libpq parallel build
Previous Message Jasen Betts 2012-02-06 11:13:08 Re: Why extract( ... from timestamp ) is not immutable?