Re: SQL Functions and plan time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL Functions and plan time
Дата
Msg-id 25631.1057690091@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL Functions and plan time  (Richard Huxton <dev@archonet.com>)
Ответы Re: SQL Functions and plan time  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Richard Huxton <dev@archonet.com> writes:
> Can I ask why, since the plan is constructed at query-time the parameters
> aren't substitued *before* planning?

Because then the plan couldn't be re-used.  A SQL function may be
executed many times in a query, so the plan has to be reusable.
(Or, if you prefer, we have query-level caching of SQL function plans.)

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PG crash on simple query, story continues
Следующее
От: "Maksim Likharev"
Дата:
Сообщение: Re: PG crash on simple query, story continues