Re: Constraint exclusion can't process simple constant expressions?

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: Constraint exclusion can't process simple constant expressions?
Дата
Msg-id BANLkTinY9G33LEsnLmWbkR0j3TcxX+HGug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Constraint exclusion can't process simple constant expressions?  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Constraint exclusion can't process simple constant expressions?  (Josh Berkus <josh@agliodbs.com>)
Re: Constraint exclusion can't process simple constant expressions?  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-performance
On 21 April 2011 11:58, Josh Berkus <josh@agliodbs.com> wrote:
>> timestamptz + interval is not immutable --- in fact, the particular
>> example you give (ts + '1 day') is certainly dependent on timezone
>> setting.
>
> Why not?  Given that the time zone will be the same for both the
> timestamptz and the interval, how would the result not be immutable?
>

"IMMUTABLE indicates that the function cannot modify the database and
always returns the same result when given the same argument values"

Emphasis on "always".  If the result of the function, given the same
argument values, can be different after a SET, then it doesn't qualify
for immutability.  At least, that's my understanding.

Cheers,
BJ

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Constraint exclusion can't process simple constant expressions?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Constraint exclusion can't process simple constant expressions?