mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
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).
This commit is contained in:
@ -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);
|
||||
@ -1758,6 +1761,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
|
||||
|
Reference in New Issue
Block a user