pgsql: Clean up package namespace use and use of Safe in plperl.

From: adunstan(at)postgresql(dot)org (Andrew Dunstan)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up package namespace use and use of Safe in plperl.
Date: 2010-02-16 21:39:52
Message-ID: 20100216213952.544547541C5@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Clean up package namespace use and use of Safe in plperl.
Prevent use of another buggy version of Safe.pm.
Only register the exit handler if we have successfully created an interpreter.
Change log level of perl warnings from NOTICE to WARNING.

The infrastructure is there if in future we decide to allow
DBAs to specify extra modules that will be allowed in trusted code.
However, for now the relevant variables are declared as lexicals
rather than as package variables, so that they are not (or should not be)
accessible.

Mostly code from Tim Bunce, reviewed by Alex Hunsaker, with some
tweaks by me.

Modified Files:
--------------
pgsql/src/pl/plperl:
plc_perlboot.pl (r1.4 -> r1.5)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_perlboot.pl?r1=1.4&r2=1.5)
plc_safe_ok.pl (r1.4 -> r1.5)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_safe_ok.pl?r1=1.4&r2=1.5)
plperl.c (r1.167 -> r1.168)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c?r1=1.167&r2=1.168)
pgsql/src/pl/plperl/expected:
plperl.out (r1.18 -> r1.19)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperl.out?r1=1.18&r2=1.19)
plperl_elog.out (r1.8 -> r1.9)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperl_elog.out?r1=1.8&r2=1.9)
plperlu.out (r1.2 -> r1.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperlu.out?r1=1.2&r2=1.3)
pgsql/src/pl/plperl/sql:
plperl.sql (r1.16 -> r1.17)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/sql/plperl.sql?r1=1.16&r2=1.17)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2010-02-16 22:19:59 pgsql: Add query text to auto_explain output.
Previous Message Bruce Momjian 2010-02-16 21:35:51 pgsql: Move log_error_verbosity GUC setting to "What to log" section,

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-02-16 21:42:29 Re: CommitFest Status Summary - 2010-02-14
Previous Message Bruce Momjian 2010-02-16 21:36:12 Re: log_error_verbosity placement