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