Re: Plperl trigger variables no longer global - Mailing list pgsql-bugs

From Alex Hunsaker
Subject Re: Plperl trigger variables no longer global
Date
Msg-id BANLkTikJNiCM5Ek2TX4=AVT2LAR-3WKm7A@mail.gmail.com
Whole thread Raw
In response to Plperl trigger variables no longer global  (Greg Sabino Mullane <greg@endpoint.com>)
Responses Re: Plperl trigger variables no longer global
List pgsql-bugs
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.

pgsql-bugs by date:

Previous
From: "Frank Brown"
Date:
Subject: BUG #6006: Will not install
Next
From: Dave Page
Date:
Subject: Re: BUG #6006: Will not install