summaryrefslogtreecommitdiff
path: root/src/pl/plperl/sql
AgeCommit message (Collapse)Author
2010-01-20Add utility functions to PLPerl:Andrew Dunstan
quote_literal, quote_nullable, quote_ident, encode_bytea, decode_bytea, looks_like_number, encode_array_literal, encode_array_constructor. Split SPI.xs into two - SPI.xs now contains only SPI functions. Remainder are in new Util.xs. Some more code and documentation cleanup along the way, as well as adding some CVS markers to files missing them. Original patch from Tim Bunce, with a little editing from me.
2010-01-09Provide regression testing for plperlu, and for plperl+plperlu interaction.Andrew Dunstan
The latter are only run if the platform can run both interpreters in the same backend.
2010-01-09Tidy up and refactor plperl.c.Andrew Dunstan
- Changed MULTIPLICITY check from runtime to compiletime. No loads the large Config module. - Changed plperl_init_interp() to return new interp and not alter the global interp_state - Moved plperl_safe_init() call into check_interp(). - Removed plperl_safe_init_done state variable as interp_state now covers that role. - Changed plperl_create_sub() to take a plperl_proc_desc argument. - Simplified return value handling in plperl_create_sub. - Changed perl.com link in the docs to perl.org and tweaked wording to clarify that require, not use, is what's blocked. - Moved perl code in large multi-line C string literal macros out to plc_*.pl files. - Added a test2macro.pl utility to convert the plc_*.pl files to macros in a perlchunks.h file which is #included - Simplifed plperl_safe_init() slightly - Optimized pg_verifymbstr calls to avoid unneeded strlen()s. Patch from Tim Bunce, with minor editing from me.
2009-11-29Add support for anonymous code blocks (DO blocks) to PL/Perl.Tom Lane
Joshua Tolley, reviewed by Brendan Jurd and Tim Bunce
2007-01-28Remove unnecessary checkpoint from PL regression tests. This was onceTom Lane
handy to prevent core dump files from disappearing, but it's useless now because (a) we don't drop core in individual DB subdirectories anymore, and (b) CREATE DATABASE forces an internal checkpoint anyway.
2007-01-27Allow args to spi_prepare to be standard type aliaes as well as those known ↵Andrew Dunstan
in pg_type. Fixes bug #2917. Add some regression tests for these cases.
2006-08-13Back out plperl OUT hash/array parameter patch, again.Bruce Momjian
2006-08-13Re-apply plperl patch that allows OUT parameters to be placed into PerlBruce Momjian
hash and array variables. (regression output updated)
2006-08-12Back out patch for plperl to handle OUT paramaters into arrays andBruce Momjian
hashes. Was causing regression failures.
2006-08-11plperl:Bruce Momjian
Allow conversion from perl to postgresql array in OUT parameters. Second, allow hash form output from procedures with one OUT argument. Pavel Stehule
2006-05-26Add table_name and table_schema to plperl trigger data. relname isAndrew Dunstan
kept but now deprecated. Patch from Adam Sjøgren. Add regression test to show plperl trigger data (Andrew). TBD: apply similar changes to plpgsql, plpython and pltcl.
2006-03-05Prepared queries for PLPerl, plus fixing a small plperl memory leak. PatchAndrew Dunstan
and docs from Dmitry Karasik, slightly editorialised.
2005-11-18translate undef to NULL for result arrayref, now that we allow NULLs in ↵Andrew Dunstan
arrays. Update plperl regression test accordingly.
2005-08-24Make the plperl regression tests pass in 'use_strict' mode, by addingTom Lane
'my' where appropriate. Michael Fuhr
2005-08-24Fix up plperl 'use_strict' so that it can be enabled or disabled on theTom Lane
fly. Fix problem with incompletely duplicated setup code. Andrew Dunstan, from an idea of Michael Fuhr's.
2005-07-12Fix plperl to do recursion safely, and fix a problem with array results.Tom Lane
Add suitable regression tests. Andrew Dunstan
2005-07-10The attached patch implements spi_query() and spi_fetchrow() functionsBruce Momjian
for PL/Perl, to avoid loading the entire result set into memory as the existing spi_exec_query() function does. Here's how one might use the new functions: $x = spi_query("select ..."); while (defined ($y = spi_fetchrow($x))) { ... return_next(...); } The changes do not affect the spi_exec_query() interface in any way. Abhijit Menon-Sen
2005-07-06Currently, nonfatal warnings are not trapped (as they should be) byBruce Momjian
plperl - the attached small patch remedies that omission, and adds a small regression test for error and warning output - the new regression input and expected output are in separate attached files. Andrew Dunstan
2005-06-05Here's a patch to do the following:Bruce Momjian
1. Rename spi_return_next to return_next. 2. Add a new test for return_next. 3. Update the expected output. 4. Update the documentation. Abhijit Menon-Sen
2005-05-24Add regression tests for previously-untested PL/Perl features. FromNeil Conway
Andrew Dunstan.
2005-05-14Convert the existing regression test scripts for the various optionalTom Lane
PLs to use the standard pg_regress infrastructure. No changes in the tests themselves. Andrew Dunstan