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 20120125154813.GB25970@depesz.com
Whole thread Raw
In response to Re: Why extract( ... from timestamp ) is not immutable?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Why extract( ... from timestamp ) is not immutable?
List pgsql-general
On Wed, Jan 25, 2012 at 10:43:59AM -0500, Tom Lane wrote:
> hubert depesz lubaczewski <depesz@depesz.com> writes:
> > how can I then have immutable epoch for given point in time?
>
> What do you consider to be "a given point in time"?  It seems like
> you have not thought through what effects the timezone setting has
> on your concept of "now", or at least you have not explained what
> you need.
> Perhaps even more to the point, why aren't you just storing the
> timestamp or timestamptz value and being happy with that?

This is to implement constraint exclusion, where I'm ab-using geometric
functions with base being epoch.

anyway - the point is that in \df date_part(, timestamp) says it's
immutable, while it is not.

As for "what do you consider to be "a given point in time" - value of
timestamptz type.
I have this value in database, and need to use its epoch as base for
index.

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: hubert depesz lubaczewski
Date:
Subject: Re: Why extract( ... from timestamp ) is not immutable?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Why extract( ... from timestamp ) is not immutable?