Re: why does plperl cache functions using just a bool for is_trigger
Alex Hunsaker <badalex@gmail.com>
From: Alex Hunsaker <badalex@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, Jan Urbański <wulczer@wulczer.org>, Postgres - Hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-02T00:40:00Z
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
Attachments
- pltcl_rm_tgrelod_key_v2.patch (text/x-patch) patch v2
On Mon, Nov 1, 2010 at 16:59, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Alex Hunsaker <badalex@gmail.com> writes: >> Speaking of which, pltcl stores the trigger reloid instead of a flag >> (it also uses tg_reloid in the internal proname). It seems a tad >> excessive to have one function *per* trigger table. > > Surely, removing the internal name's dependency on the istrigger flag is > wrong. If you're going to maintain separate hash entries at the pltcl > level, why would you want to risk collisions underneath that? Good catch. I was basing it off plperl which uses the same proname for both (sprintf(subname, %s__%u", prodesc->proname, fn_oid)). Its OK for plperl because when we compile we save a reference to it and use that directly (more or less). The name does not really matter.