Re: Exclusion constraint issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Exclusion constraint issue
Дата
Msg-id 28388.1285363335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Exclusion constraint issue  (Eric McKeeth <eldin00@gmail.com>)
Ответы Re: Exclusion constraint issue  (David Fetter <david@fetter.org>)
Re: Exclusion constraint issue  (Eric McKeeth <eldin00@gmail.com>)
Список pgsql-general
Eric McKeeth <eldin00@gmail.com> writes:
> why would I get the following error, since the period() function is in fact
> declared as immutable?

> test=# ALTER TABLE test3 ADD exclude using
> gist(period(effect_date::timestamptz, expire_date::timestamptz) with && );
> ERROR:  functions in index expression must be marked IMMUTABLE

period() might be immutable, but those casts from date to timestamptz
are not, because they depend on the TimeZone parameter.

            regards, tom lane

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

Предыдущее
От: Eric McKeeth
Дата:
Сообщение: Exclusion constraint issue
Следующее
От: Leif Biberg Kristensen
Дата:
Сообщение: Re: Trade Study on Oracle vs. PostgreSQL