Add on_perl_init and proper destruction to plperl [PATCH]

Tim Bunce <tim.bunce@pobox.com>

From: Tim Bunce <Tim.Bunce@pobox.com>
To: pgsql-hackers@postgresql.org
Cc: Tim Bunce <Tim.Bunce@pobox.com>
Date: 2010-01-14T22:11:29Z
Lists: pgsql-hackers

Attachments

This is the third of the patches to be split out from the former 'plperl
feature patch 1'.

Changes in this patch:

- Added plperl.on_perl_init GUC for DBA use (PGC_SIGHUP)
    SPI functions are not available when the code is run.

- Added normal interpreter destruction behaviour
    END blocks, if any, are run then objects are
    destroyed, calling their DESTROY methods, if any.
    SPI functions will die if called at this time.

Tim.