Re: [HACKERS] Why extract( ... from timestamp ) is not immutable?
От | hubert depesz lubaczewski |
---|---|
Тема | Re: [HACKERS] Why extract( ... from timestamp ) is not immutable? |
Дата | |
Msg-id | 20120130172859.GB8109@depesz.com обсуждение исходный текст |
Ответ на | Re: Why extract( ... from timestamp ) is not immutable? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
On Wed, Jan 25, 2012 at 11:30:49AM -0500, Tom Lane wrote: > hubert depesz lubaczewski <depesz@depesz.com> writes: > > anyway - the point is that in \df date_part(, timestamp) says it's > > immutable, while it is not. > > Hmm, you're right. I thought we'd fixed that way back when, but > obviously not. Or maybe the current behavior of the epoch case > postdates that. is there a chance something will happen with/about it? preferably I would see extract( epoch from timestamp ) to be really immutable, i.e. (in my opinion) it should treat incoming data as UTC - for epoch calculation. Alternatively - perhaps epoch extraction should be moved to specialized function, which would have swapped mutability: get_epoch(timestamptz) would be immutable while get_epoch(timestamp) would be stable Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/
В списке pgsql-general по дате отправления: