Could Postgres warn about incorrect volatility class?

Поиск
Список
Период
Сортировка
От Philip Semanchuk
Тема Could Postgres warn about incorrect volatility class?
Дата
Msg-id 5EB0EA00-DDFC-466C-88EE-F2230065EC24@americanefficient.com
обсуждение исходный текст
Список pgsql-general
Hi all,
I recently discovered that a custom function that I thought was being inlined was not being inlined because I had
declaredit IMMUTABLE, but the function body cast an enum value to text which is a STABLE operator. Once I corrected my
function'sdefinition to declare it STABLE, Postgres inlined it.  

Since Postgres can apparently determine during query parsing that my function has a volatility class mismatch, is there
areason that Postgres can't make the same determination and inform me about it when I define the function? In this case
ahelpful message would have been "I sure hope you know what you're doing..." :-) 

Thanks
Philip


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

Предыдущее
От: KOPOSOV Sergey
Дата:
Сообщение: Re: int8range and index usage for <@ operator
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: Is this a reasonable use for advisory locks?