Re: Invalid optimization of VOLATILE function in WHERE clause?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Invalid optimization of VOLATILE function in WHERE clause?
Дата
Msg-id 5059EAA0020000250004A533@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Invalid optimization of VOLATILE function in WHERE clause?  ("David Johnston" <polobo@yahoo.com>)
Ответы Re: Invalid optimization of VOLATILE function in WHERE clause?  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-hackers
"David Johnston" <polobo@yahoo.com> wrote:
>> | VOLATILE indicates that the function value can change even
>> | within a single table scan, so no optimizations can be made.
>> | Relatively few database functions are volatile in this sense;
>> | some examples are random(), [...]
> What are the arguments against adding a 4th identifier - call it
> PER_ROW for this argument?  The main reason VOLATILE is broken is
> that it is the default and in order to minimize beginner's penalty
> it is not treated as such in some situations.  The new one could
> behave just like VOLATILE but would never be optimized away and
> would always evaluate once for each row in its context.  
So how would you document that?  It sounds like the proposed level
would behave exactly as the VOLATILE level is currently documented
to behave; so I guess we could shift the documentation of VOLATILE
to PER_ROW (or whatever).  How would you then describe the behavior
of VOLATILE?
-Kevin



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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Invalid optimization of VOLATILE function in WHERE clause?
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: Invalid optimization of VOLATILE function in WHERE clause?