Re: Stored procedure declared as VOLATILE => no good optimization is done

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Stored procedure declared as VOLATILE => no good optimization is done
Дата
Msg-id 20101016.104738.1076064300636336418.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: Stored procedure declared as VOLATILE => no good optimization is done  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Stored procedure declared as VOLATILE => no good optimization is done
Список pgsql-performance
> broadly speaking:
> *) function generates same output from inputs regardless of what's
> going on in the database, and has no side effects: IMMUTABLE

So can I say "if a function is marked IMMUTABLE, then it should never
modify database"? Is there any counter example?

> *) function reads (only) from tables, or is an immutable function in
> most senses but influenced from the GUC (or any other out of scope
> thing): STABLE

It seems if above is correct, I can say STABLE functions should never
modify databases as well.

> *) all other cases: VOLATILE (which is btw the default)
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Stored procedure declared as VOLATILE => no good optimization is done
Следующее
От: Navkirat Singh
Дата:
Сообщение: UUID performance as primary key