Re: why does plperl cache functions using just a bool for is_trigger
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Jan Urbański <wulczer@wulczer.org>, Postgres - Hackers <pgsql-hackers@postgresql.org>
Date: 2010-10-25T01:34:33Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove unnecessary use of trigger flag to hash plperl functions
- 2d01ec0708d5 9.1.0 cited
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