The attached patch, which incorporates the previous one sent and
authorBruce Momjian <bruce@momjian.us>
Mon, 12 Jul 2004 14:31:04 +0000 (14:31 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 12 Jul 2004 14:31:04 +0000 (14:31 +0000)
commit96b9dc1aefd3d0166db6be8c9535c55c94716638
treeab37083b195cd2e840c64c0f743eaff18ec324d5
parentf4c5e06edf03774258886c802e63c5a3b9cf1e4c
The attached patch, which incorporates the previous one sent and
currently unapplied regarding spi_internal.c, makes some additional
fixes relating to return types, and also contains the fix for
preventing  the use of insecure versions of Safe.pm.

There is one remaing return case that does not appear to work, namely
return of a composite directly in a select, i.e. if  foo returns some
composite type, 'select * from foo()' works but 'select foo()' doesn't.
We will either fix that or document it as a limitation.

The function plperl_func_handler is a mess - I will try to get it
cleaned up (and split up) in a subsequent patch, time permitting.

Also, reiterating previous advice - this changes slightly the API for
spi_exec_query - the returned object has either 2 or 3 members: 'status'
(string) and 'proceesed' (int,- number of rows) and, if rows are
returned, 'rows' (array of tuple hashes).

Andrew Dunstan
src/pl/plperl/plperl.c
src/pl/plperl/spi_internal.c
src/pl/plperl/spi_internal.h