Thread: pgsql: Various small improvements and cleanups for PL/Perl.
pgsql: Various small improvements and cleanups for PL/Perl.
From
adunstan@postgresql.org (Andrew Dunstan)
Date:
Log Message: ----------- Various small improvements and cleanups for PL/Perl. - Allow (ineffective) use of 'require' in plperl If the required module is not already loaded then it dies. So "use strict;" now works in plperl. - Pre-load the feature module if perl >= 5.10. So "use feature :5.10;" now works in plperl. - Stored procedure subs are now given names. The names are not visible in ordinary use, but they make tools like Devel::NYTProf and Devel::Cover much more useful. - Simplified and generalized the subroutine creation code. Now one code path for generating sub source code, not four. Can generate multiple 'use' statements with specific imports (which handles plperl.use_strict currently and can easily be extended to handle a plperl.use_feature=':5.12' in future). - Disallows use of Safe version 2.20 which is broken for PL/Perl. http://rt.perl.org/rt3/Ticket/Display.html?id=72068 - Assorted minor optimizations by pre-growing data structures. Patch from Tim Bunce, reviewed by Alex Hunsaker. Modified Files: -------------- pgsql/doc/src/sgml: plperl.sgml (r2.74 -> r2.75) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/plperl.sgml?r1=2.74&r2=2.75) pgsql/src/pl/plperl: plc_perlboot.pl (r1.2 -> r1.3) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_perlboot.pl?r1=1.2&r2=1.3) plc_safe_bad.pl (r1.2 -> r1.3) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_safe_bad.pl?r1=1.2&r2=1.3) plc_safe_ok.pl (r1.2 -> r1.3) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_safe_ok.pl?r1=1.2&r2=1.3) plperl.c (r1.160 -> r1.161) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c?r1=1.160&r2=1.161) pgsql/src/pl/plperl/expected: plperl.out (r1.17 -> r1.18) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperl.out?r1=1.17&r2=1.18) plperl_plperlu.out (r1.1 -> r1.2) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperl_plperlu.out?r1=1.1&r2=1.2) pgsql/src/pl/plperl/sql: plperl.sql (r1.15 -> r1.16) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/sql/plperl.sql?r1=1.15&r2=1.16) plperl_plperlu.sql (r1.1 -> r1.2) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/sql/plperl_plperlu.sql?r1=1.1&r2=1.2)