diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-04 21:51:14 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-04 21:51:14 -0500 |
commit | 63b656b7bf39beb5b6095ab2b5e1e4e9d8c6a965 (patch) | |
tree | 2d116388fbe0c64f1b3887b254ff58d163df2d43 /src/pl/plperl/plperl.c | |
parent | efa415da8c0fb8c1c0bc50faebac430f8b917571 (diff) |
Create extension infrastructure for the core procedural languages.
This mostly just involves creating control, install, and
update-from-unpackaged scripts for them. However, I had to adjust plperl
and plpython to not share the same support functions between variants,
because we can't put the same function into multiple extensions.
catversion bump forced due to new contents of pg_pltemplate, and because
initdb now installs plpgsql as an extension not a bare language.
Add support for regression testing these as extensions not bare
languages.
Fix a couple of other issues that popped up while testing this: my initial
hack at pg_dump binary-upgrade support didn't work right, and we don't want
an extra schema permissions test after all.
Documentation changes still to come, but I'm committing now to see
whether the MSVC build scripts need work (likely they do).
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 72e1e5106a6..9a94b3f0852 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -222,6 +222,9 @@ static plperl_call_data *current_call_data = NULL; Datum plperl_call_handler(PG_FUNCTION_ARGS); Datum plperl_inline_handler(PG_FUNCTION_ARGS); Datum plperl_validator(PG_FUNCTION_ARGS); +Datum plperlu_call_handler(PG_FUNCTION_ARGS); +Datum plperlu_inline_handler(PG_FUNCTION_ARGS); +Datum plperlu_validator(PG_FUNCTION_ARGS); void _PG_init(void); static PerlInterpreter *plperl_init_interp(void); @@ -1759,6 +1762,39 @@ plperl_validator(PG_FUNCTION_ARGS) /* + * plperlu likewise requires three externally visible functions: + * plperlu_call_handler, plperlu_inline_handler, and plperlu_validator. + * These are currently just aliases that send control to the plperl + * handler functions, and we decide whether a particular function is + * trusted or not by inspecting the actual pg_language tuple. + */ + +PG_FUNCTION_INFO_V1(plperlu_call_handler); + +Datum +plperlu_call_handler(PG_FUNCTION_ARGS) +{ + return plperl_call_handler(fcinfo); +} + +PG_FUNCTION_INFO_V1(plperlu_inline_handler); + +Datum +plperlu_inline_handler(PG_FUNCTION_ARGS) +{ + return plperl_inline_handler(fcinfo); +} + +PG_FUNCTION_INFO_V1(plperlu_validator); + +Datum +plperlu_validator(PG_FUNCTION_ARGS) +{ + return plperl_validator(fcinfo); +} + + +/* * Uses mksafefunc/mkunsafefunc to create a subroutine whose text is * supplied in s, and returns a reference to it */ |