PostgreSQL::PLPerl::Trace is a simple way to trace execution of Perl statements in PL/Perl. WWW: http://search.cpan.org/dist/PostgreSQL-PLPerl-Trace/