Re: Plperl trigger variables no longer global

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Greg Sabino Mullane <greg(at)endpoint(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Plperl trigger variables no longer global
Date: 2011-05-04 22:20:35
Message-ID: BANLkTikJNiCM5Ek2TX4=AVT2LAR-3WKm7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, May 3, 2011 at 17:40, Greg Sabino Mullane <greg(at)endpoint(dot)com> wrote:
> This works in 9.0 but not in git/9.1 beta:
>
> CREATE FUNCTION wheredidmytdgo()
> RETURNS TRIGGER
> LANGUAGE plperlu
> AS
> $bc$
>    use strict; use warnings;
>    my $new = $_TD->{new};
>    return;
> $bc$;
>
> The error is:
>
> ERROR:  Global symbol "$_TD" requires explicit package name at line 3.
> CONTEXT:  compilation of PL/Perl function "wheredidmytdgo"

This seems to be broken by
http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=ef19dc6d39dd2490ff61489da55d95d6941140bf
(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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dave Page 2011-05-04 23:09:56 Re: BUG #6006: Will not install
Previous Message Frank Brown 2011-05-04 21:25:09 BUG #6006: Will not install