On 11/07/2010 5:46 AM, Pavel Stehule wrote:
any using a non simple expression is very slow - so there can be some
a warning when people use it. Sometimes people don't know (me too),
when use expensive expression
for example
rowvar := (10,20)
it isn't simple - I am not sure, if it is true still.
Rather than warning whenever the SPI is invoked from PL/PgSQL, perhaps
this would be a task better suited for inclusion in a profiler feature
for the PL/PgSQL debugger?
I'm not particularly interested in the notion myself, but I don't think
warnings about "non-simple" statements would be very helpful. You'd be
drowned in warnings for statements that were a necessary part of the
operation of your functions, things for which there was no other way to
do it.
It seems like a profiler, which is designed to filter and organize the
collected data, and which can be attached only to specific functions
that you want to know about, might be a better job. As there's already a
PL/PgSQL debugger, some of the infrastructure required is already present.
Meh, personally I'll stick to the good old profiling methods "is it fast
enough", "\timing", and "explain analyze".
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general