From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why extract( ... from timestamp ) is not immutable? |
Date: | 2012-01-25 15:48:13 |
Message-ID: | 20120125154813.GB25970@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Wed, Jan 25, 2012 at 10:43:59AM -0500, Tom Lane wrote:
> hubert depesz lubaczewski <depesz(at)depesz(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2012-01-25 15:48:34 | Re: Why extract( ... from timestamp ) is not immutable? |
Previous Message | hubert depesz lubaczewski | 2012-01-25 15:44:44 | Re: Why extract( ... from timestamp ) is not immutable? |
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2012-01-25 15:48:34 | Re: Why extract( ... from timestamp ) is not immutable? |
Previous Message | hubert depesz lubaczewski | 2012-01-25 15:44:44 | Re: Why extract( ... from timestamp ) is not immutable? |