Re: Why extract( ... from timestamp ) is not immutable?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Why extract( ... from timestamp ) is not immutable?
Дата
Msg-id 201201251604.45680.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: Why extract( ... from timestamp ) is not immutable?  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
On Wednesday, January 25, 2012 2:46:39 pm hubert depesz lubaczewski wrote:
> 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.

Alright, because the epoch and timezone* fields do timezone manipulation on the
supplied values. Well learned a lot. Thanks.

>
> Best regards,
>
> depesz

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Nick
Дата:
Сообщение: How to know if update is from a foreign key cascade in plperl?
Следующее
От: Leguevaques Alex
Дата:
Сообщение: Composite Type : pros and cons