summaryrefslogtreecommitdiff
path: root/src/pl/plperl/plperl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r--src/pl/plperl/plperl.c36
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
*/