Re: plpgsql: penalty due to double evaluation of parameters

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: plpgsql: penalty due to double evaluation of parameters
Дата
Msg-id 4834148E.7030800@enterprisedb.com
обсуждение исходный текст
Ответ на plpgsql: penalty due to double evaluation of parameters  (Nikhils <nikkhils@gmail.com>)
Ответы Re: plpgsql: penalty due to double evaluation of parameters  (Nikhils <nikkhils@gmail.com>)
Re: plpgsql: penalty due to double evaluation of parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Nikhils wrote:
> Within exec_prepare_plan there are calls to exec_eval_datum to identify the
> argtypes of the involved parameters. However exec_eval_datum actually fills
> up value, isnull entries in these cases causing unnecessary additional calls
> when all we need is the datum type. Such unnecessary evaluation of values
> might prove to be very costly later since this quirk of exec_eval_datum
> usage is not so visible. Worse still it could cause bugs if some evaluations
> have side-effects across multiple evals.

I don't buy the performance argument unless I see some test results 
demonstrating it; exec_prepare_plan is only called on the first 
invocation of a statement. What kind of side-effects could 
exec_eval_datum call have?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: idea: storing view source in system catalogs
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [PATCHES] WITH RECURSIVE patch V0.1