Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly
Дата
Msg-id 16701.1136576939@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-bugs
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> Is caching of results for STABLE/IMMUTABLE functions called with a
> constant something that would be reasonable to add?

I tend to think not: the distributed overhead would outweigh the
advantages.  See previous discussions in the archives.

(However, the previous discussions have imagined an explicit cache
that stores function names, arguments, and results.  Your thought
of transforming the call into an InitPlan node might be interesting.
The trick is still to know which functions are expensive enough to
justify the overhead of an InitPlan.)

            regards, tom lane

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly