Re: Feature patch 1 for plperl [PATCH]

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feature patch 1 for plperl [PATCH]
Date: 2010-01-09 03:36:43
Message-ID: 603c8f071001081936t57d12a89u9b6405c83d94091c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 8, 2010 at 10:01 AM, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> wrote:
> I didn't get any significant feedback from the earlier draft so here's
> the finished 'feature patch 1' for plperl.  (This builds on my earlier
> plperl refactoring patch, and the follow-on ppport.h patch.)
>
> Significant changes from the first draft:
> - New GUC plperl.on_perl_init='...perl...' for admin use.ef
> - New GUC plperl.on_trusted_init='...perl...' for plperl user use.
> - New GUC plperl.on_untrusted_init='...perl...' for plperlu user use.

I kind of thought Tom said these were a bad idea, and I think I kind
of agree. We're not going to support multi-line values for GUCs
AFAIK, so this is going to be pretty kludgy. What about making the
value a comma-separated list of module names to use, or something?

> - END blocks now run at backend exit (fixes bug #5066).
> - Stored procedure subs are now given names ($name__$oid).
> - More error checking and reporting.
> - Warnings no longer have an extra newline in the NOTICE text.
> - Various minor optimizations like pre-growing data structures.
>
> Additional changes from the second draft:
> - SPI functions aren't available during plperl.on_*_init execution.
> - Added utility functions: quote_literal, quote_nullable, quote_ident,
>    encode_bytea, decode_bytea, looks_like_number,
>    encode_array_literal, encode_array_constructor.
> - Enabled plperl to "use"/"require" safely by redirecting the require
>    opcode to code that dies if module not already loaded.
> - Corresponding changes to the documentation.
>
> Additional changes in this version:
> - Added the missing ', arguments' to docs of spi_exec_prepared().
> - Added Util.c to list of files for plperl make clean to delete.
>
> I'll add this to the commitfest.

The rest of this all seems pretty nice, though I haven't read the patch yet.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2010-01-09 03:46:10 Re: Setting oom_adj on linux?
Previous Message Tom Lane 2010-01-09 03:35:24 Re: Add .gitignore files to CVS?