Re: [HACKERS] plpgsql: penalty due to double evaluation of parameters

2008-05-25 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: 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? In principle, if you

Re: [HACKERS] plpgsql: penalty due to double evaluation of parameters

2008-05-21 Thread Heikki Linnakangas
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

Re: [HACKERS] plpgsql: penalty due to double evaluation of parameters

2008-05-21 Thread Nikhils
Hi, 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? Note that I have avoided using the performance word for this very

[HACKERS] plpgsql: penalty due to double evaluation of parameters

2008-05-20 Thread Nikhils
Hi, 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