Commit 814e08e8 authored by Alvaro Herrera's avatar Alvaro Herrera

plperl: Package-qualify _TD

Failing to do so causes trigger invocation to fail when they are nested
within a function invocation that changes the current package.

Backpatch to 9.1; previous releases used a different method to obtain
_TD.  Per bug report from Mark Murawski (bug #6511)

Author: Alex Hunsaker
parent 02b183ac
...@@ -2062,7 +2062,7 @@ plperl_call_perl_trigger_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo, ...@@ -2062,7 +2062,7 @@ plperl_call_perl_trigger_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo,
ENTER; ENTER;
SAVETMPS; SAVETMPS;
TDsv = get_sv("_TD", 0); TDsv = get_sv("main::_TD", 0);
if (!TDsv) if (!TDsv)
elog(ERROR, "couldn't fetch $_TD"); elog(ERROR, "couldn't fetch $_TD");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment