Re: why does plperl cache functions using just a bool for is_trigger - Mailing list pgsql-hackers

From Tom Lane
Subject Re: why does plperl cache functions using just a bool for is_trigger
Date
Msg-id 26683.1287970473@sss.pgh.pa.us
Whole thread Raw
In response to Re: why does plperl cache functions using just a bool for is_trigger  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: why does plperl cache functions using just a bool for is_trigger
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 10/24/2010 07:50 PM, Tom Lane wrote:
>> Andrew Dunstan<andrew@dunslane.net>  writes:
>>> Why do we need the is_trigger flag at all for the plperl hash key? At
>>> first glance it strikes me as unnecessary.

>> We might not.  Does the presence or absence of the $_TD hash reference
>> have any impact on what we cache, or what Perl might cache internally?

> For both trigger and non-trigger functions, we compile this ahead of the 
> user-set function code:
>     our $_TD; local $_TD=shift;
> Non-trigger functions get passed "undef" to correspond to this invisible 
> argument, while trigger functions get passed the hashref that the 
> trigger calling code has set up.

Seems like we don't need it then.  You going to get rid of it?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Extensions, this time with a patch
Next
From: Andrew Dunstan
Date:
Subject: Re: WIP: extensible enums