Skip site navigation (1) Skip section navigation (2)

Miscellaneous changes to plperl [PATCH]

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: Miscellaneous changes to plperl [PATCH]
Date: 2010-01-14 16:07:16
Message-ID: 20100114160716.GF8024@timac.local (view raw or flat)
Thread:
Lists: pgsql-hackers
This is the second of the patches to be split out from the former
'plperl feature patch 1'.

Changes in this patch:

- 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.

This patch will apply cleanly over the 'add functions' patch:
https://commitfest.postgresql.org/action/patch_view?id=264

Tim.

Attachment: plperl-misc.patch
Description: text/x-patch (33.0 KB)

Responses

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-01-14 16:28:03
Subject: Re: Streaming replication, retrying from archive
Previous:From: Kevin GrittnerDate: 2010-01-14 16:07:08
Subject: Re: archive_timeout behavior for no activity

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group