diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2010-01-20 01:08:21 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2010-01-20 01:08:21 +0000 |
commit | 05672e50458dc00b4a243c2d9bead0d96f7adbc1 (patch) | |
tree | 772add916c5d7f6a95d1c500017c00f7f74cc15f /src/pl/plperl/plperl.c | |
parent | 5b13d1ff5311db305911ed9c5b788db77763d4f9 (diff) | |
download | postgresql-05672e50458dc00b4a243c2d9bead0d96f7adbc1.tar.gz postgresql-05672e50458dc00b4a243c2d9bead0d96f7adbc1.zip |
Add utility functions to PLPerl:
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.
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 1dd704ffd06..6daab687c3b 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1,7 +1,7 @@ /********************************************************************** * plperl.c - perl as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.159 2010/01/09 02:40:50 adunstan Exp $ + * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.160 2010/01/20 01:08:21 adunstan Exp $ * **********************************************************************/ @@ -589,12 +589,12 @@ plperl_convert_to_pg_array(SV *src) XPUSHs(src); PUTBACK; - count = call_pv("::_plperl_to_pg_array", G_SCALAR); + count = perl_call_pv("::encode_array_literal", G_SCALAR); SPAGAIN; if (count != 1) - elog(ERROR, "unexpected _plperl_to_pg_array failure"); + elog(ERROR, "unexpected encode_array_literal failure"); rv = POPs; @@ -1089,7 +1089,8 @@ plperl_create_sub(plperl_proc_desc *prodesc, char *s) **********************************************************************/ EXTERN_C void boot_DynaLoader(pTHX_ CV *cv); -EXTERN_C void boot_SPI(pTHX_ CV *cv); +EXTERN_C void boot_PostgreSQL__InServer__SPI(pTHX_ CV *cv); +EXTERN_C void boot_PostgreSQL__InServer__Util(pTHX_ CV *cv); static void plperl_init_shared_libs(pTHX) @@ -1097,7 +1098,10 @@ plperl_init_shared_libs(pTHX) char *file = __FILE__; newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); - newXS("SPI::bootstrap", boot_SPI, file); + newXS("PostgreSQL::InServer::SPI::bootstrap", + boot_PostgreSQL__InServer__SPI, file); + newXS("PostgreSQL::InServer::Util::bootstrap", + boot_PostgreSQL__InServer__Util, file); } |