Re: 8.2.4 Won't Build 8.1 Functional Indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.2.4 Won't Build 8.1 Functional Indexes
Дата
Msg-id 17138.1181173286@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 8.2.4 Won't Build 8.1 Functional Indexes  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: 8.2.4 Won't Build 8.1 Functional Indexes  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: 8.2.4 Won't Build 8.1 Functional Indexes  ("Chris Hoover" <revoohc@gmail.com>)
Список pgsql-admin
Alvaro Herrera <alvherre@commandprompt.com> writes:
> You can't do this because to_date and other functions are not immutable.
> 8.2 seems to be more picky about this -- the date conversions of
> timestamptz columns are dependent on the current timezone.

The reason 8.2 is more picky is that the function is less immutable
thanks to the addition of locale-dependent functionality:
http://archives.postgresql.org/pgsql-committers/2006-11/msg00264.php

I gather that the underlying column is timestamp without tz, or it would
never have worked in 8.1 either.  That being the case, these index
definitions seem pretty darn stupid anyway --- why aren't you just
indexing on date_trunc or a plain cast to date?

            regards, tom lane

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

Предыдущее
От: Raul Retamozo
Дата:
Сообщение: copying data into another database ? (replication)
Следующее
От: Peter Koczan
Дата:
Сообщение: Re: troubleshooting "idle in transaction"