Re: why does plperl cache functions using just a bool for is_trigger

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: why does plperl cache functions using just a bool for is_trigger
Date: 2010-10-31 14:44:41
Message-ID: 4CCD80D9.3000003@wulczer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/10/10 03:59, Andrew Dunstan wrote:
>
>
> On 10/24/2010 09:34 PM, Tom Lane wrote:
>>
>>> 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?
>
> Ok, will do.

Seems that this circumverts some output conversion error checking, since
adding the attached to the regression suite results in a segfault during
the plperl installcheck.

Reverting 2d01ec0708d571eef926f3f5795aa73759df5d9a fixes it. Noticed
while fooling around with plpython and hitting a similar error (since
plpython does have a regression test for trigger functions being called
directly).

Cheers,
Jan

Attachment Content-Type Size
plperl-regression.diff text/x-patch 789 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2010-10-31 15:15:48 Re: ALTER OBJECT any_name SET SCHEMA name
Previous Message Tom Lane 2010-10-31 14:39:25 Re: type info refactoring