Re: Convincing STABLE functions to run once

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Convincing STABLE functions to run once
Дата
Msg-id 735A8879-81B1-49A1-BCB8-13B78D081396@gmail.com
обсуждение исходный текст
Ответ на Convincing STABLE functions to run once  (Dan Wells <dbw2@calvin.edu>)
Список pgsql-general
On 09 Sep 2014, at 17:23, Dan Wells <dbw2@calvin.edu> wrote:

> I often have functions which are not truly immutable (they do something minor, like read in configuration
information),but the functions themselves are fairly expensive, so I want them to run just once per query.  At face
value,I feel like STABLE should do what I want, but often it does not.   

Assuming that the part that makes these functions expensive is not the reading of the configuration information,
perhapsyou can split your functions such that the expensive part goes into an IMMUTABLE function that takes those
(STABLE)configuration values as input? 

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



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

Предыдущее
От: Jay at Verizon
Дата:
Сообщение: Re: Pgpool starting problem
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Crash in 9.4 Beta when partially collapsing left outer joins