On Tue, May 3, 2011 at 17:40, Greg Sabino Mullane <greg@endpoint.com> wrote:
> This works in 9.0 but not in git/9.1 beta:
>
> CREATE FUNCTION wheredidmytdgo()
> RETURNS TRIGGER
> LANGUAGE plperlu
> AS
> $bc$
> =C2=A0 =C2=A0use strict; use warnings;
> =C2=A0 =C2=A0my $new =3D $_TD->{new};
> =C2=A0 =C2=A0return;
> $bc$;
>
> The error is:
>
> ERROR: =C2=A0Global symbol "$_TD" requires explicit package name at line =
3.
> CONTEXT: =C2=A0compilation of PL/Perl function "wheredidmytdgo"
This seems to be broken by
http://git.postgresql.org/gitweb?p=3Dpostgresql.git;a=3Dcommit;h=3Def19dc6d=
39dd2490ff61489da55d95d6941140bf
(Set up PLPerl trigger data using C code instead of Perl code.)
Im not sure what the right fix is. Copying what
plperl_call_trigger_func() does for _TD ("get_sv("_TD", GV_ADD); ..."
into plperl_create_sub() does not seem to work.