Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> Is printing timeofday() at various points a good idea
> of profiling plpgsql functions?
Sure.
> also is anything wrong with following fragment ?
> RAISE INFO '' % , message here ... '' , timeofday() ;
IIRC, RAISE is pretty slovenly implemented :-( ... it will only take
plain variable references as additional arguments. So you'll have to
do
var := timeofday();
RAISE INFO ''... '', var;
I believe timeofday() produces TEXT, so declare the var that way.
regards, tom lane