| From: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
| Subject: | Package namespace and Safe init cleanup for plperl UPDATE 3 [PATCH] |
| Date: | 2010-01-30 23:16:08 |
| Message-ID: | 20100130231608.GI1141@timac.local |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
This is an update to the final plperl patch in the series from me.
Changes in the original patch:
- Moved internal functions out of main:: namespace
into PostgreSQL::InServer and PostgreSQL::InServer::safe
- Restructured Safe compartment setup code
to generalize and separate the data from the logic.
Neither change has any user visible effects.
Additional changes in the second version:
- Further generalized the 'what to load into Safe compartment' logic.
- Added the 'warnings' pragma to the list of modules to load into Safe.
So plperl functions can now "use warnings;" - added test for that.
- Added 'use 5.008001;' to plc_perlboot.pl as a run-time check to
complement the configure-time check added by Tom Lane recently.
Additional changes in this version:
- Rebased over recent HEAD plus "on_trusted_init" patch
- Made plc_safe_ok.pl code idempotent to avoid risk of problems
from repeated initialization attempts e.g. if on_trusted_init code
throws an exception so initialization doesn't complete.
- Fixed 'require strict' to enable 'caller' opcode
(needed for Perl >=5.10)
- Ensure Safe container opmask is restored even if @EvalInSafe code
throws an exception.
- Changed errmsg("didn't get a GLOB ...") to use errmsg_internal().
Tim.
| Attachment | Content-Type | Size |
|---|---|---|
| plperl-nscleanup3.patch | text/x-patch | 9.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Smith | 2010-01-30 23:28:06 | Re: development setup and libdir |
| Previous Message | Ivan Sergio Borgonovo | 2010-01-30 22:36:36 | Re: development setup and libdir |