Re: BUG #11637: SQL function volatility is ignored on index creation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #11637: SQL function volatility is ignored on index creation
Дата
Msg-id 29554.1412963916@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #11637: SQL function volatility is ignored on index creation  (will@willglynn.com)
Ответы Re: BUG #11637: SQL function volatility is ignored on index creation
Список pgsql-bugs
will@willglynn.com writes:
> The CREATE INDEX documentation and the wording of that error message
> strongly imply that it's a function's volatility *marking* that is
> important, but in at least some situations, PostgreSQL ignores
> pg_proc.provolatile='v' and allows index creation anyway if the function is
> in fact immutable. I suspect this qualifier is ignored because the SQL
> function call is being inlined prior to the CheckMutability() in
> ComputeIndexAttrs(); there isn't a volatile function call, just an immutable
> expression.

That's correct, and it's intentional behavior, not a bug (cf commit
5a86e5e1930d95f495a134000512d6ca22064338).  Refusing the CREATE would
just be pedantry AFAICS.

            regards, tom lane

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

Предыдущее
От: will@willglynn.com
Дата:
Сообщение: BUG #11637: SQL function volatility is ignored on index creation
Следующее
От: Alon
Дата:
Сообщение: Re: Re: [BUGS] Re: [BUGS] Re: BUG #11431: Failing to backup and restore a Windows postgres database, with Norwegian Bokmål locale.