plpgsql: penalty due to double evaluation of parameters

Поиск
Список
Период
Сортировка
От Nikhils
Тема plpgsql: penalty due to double evaluation of parameters
Дата
Msg-id d3c4af540805200332x4631a489n857ddd25fa6abe3c@mail.gmail.com
обсуждение исходный текст
Ответы Re: plpgsql: penalty due to double evaluation of parameters  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Список pgsql-hackers
Hi, <br /><br />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
additionalcalls when all we need is the datum type. Such unnecessary evaluation of values might prove to be very costly
latersince this quirk of exec_eval_datum usage is not so visible. Worse still it could cause bugs if some evaluations
haveside-effects across multiple evals. It might make sense to introduce a new function exec_eval_datum_type to address
thisor exec_eval_datum could itself be modified for cases where we just need the datum type. Should I cook up a patch
forthis? I am inclined towards introducing a new function (but that means that any new datum related changes need to be
carriedout in 2 functions instead of one currently).<br clear="all" /><br />Regards,<br />Nikhils<br />-- <br
/>EnterpriseDB              <a href="http://www.enterprisedb.com">http://www.enterprisedb.com</a> 

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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: triggers on prepare, commit, rollback... ?
Следующее
От: Sam Mason
Дата:
Сообщение: Re: triggers on prepare, commit, rollback... ?