Re: Why extract( ... from timestamp ) is not immutable?
От | hubert depesz lubaczewski |
---|---|
Тема | Re: Why extract( ... from timestamp ) is not immutable? |
Дата | |
Msg-id | 20120125154813.GB25970@depesz.com обсуждение исходный текст |
Ответ на | Re: Why extract( ... from timestamp ) is not immutable? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Why extract( ... from timestamp ) is not immutable?
|
Список | 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 по дате отправления: