Re: Why extract( ... from timestamp ) is not immutable? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Why extract( ... from timestamp ) is not immutable?
Date
Msg-id 20120125224639.GB2651@depesz.com
Whole thread Raw
In response to Re: Why extract( ... from timestamp ) is not immutable?  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: Why extract( ... from timestamp ) is not immutable?  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
On Wed, Jan 25, 2012 at 02:07:40PM -0800, Adrian Klaver wrote:
> Finally dawned on me. When you use 'at time zone' on a timestamp
> with tz it strips the tz which then allows the value to be indexed
> because:
>
> -[ RECORD 5 ]-------+-------------------------------------------------------------------------
> Schema              | pg_catalog
> Name                | date_part
> Result data type    | double precision
> Argument data types | text, timestamp without time zone
> Type                | normal
> Volatility          | immutable
> Owner               | postgres
> Language            | internal
> Source code         | timestamp_part
> Description         | extract field from timestamp

yes, but it is not correct - the value is actually stable, and not
immutable.

Best regards,

depesz

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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Why extract( ... from timestamp ) is not immutable?
Next
From: Achilleas Mantzios
Date:
Subject: Re: Incomplete startup packet help needed