Re: plpgsql: penalty due to double evaluation of parameters - Mailing list pgsql-hackers

From Nikhils
Subject Re: plpgsql: penalty due to double evaluation of parameters
Date
Msg-id d3c4af540805210620m499a5d49paf90294cdb97e805@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql: penalty due to double evaluation of parameters  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-hackers
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 reason. But consider for example when the datum type is PLPGSQL_DTYPE_REC. I dont think its justified to have the overhead of heap_copytuple_with_tuple, when all we need is just the typeid! Similar arguments apply for other datums like PLPGSQL_DTYPE_ROW, PLPGSQL_DTYPE_TRIGARG e.g.

Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1
Next
From: "Merlin Moncure"
Date:
Subject: Re: idea: storing view source in system catalogs