Skip site navigation (1) Skip section navigation (2)

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

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Jan Urbański <wulczer(at)wulczer(dot)org>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: why does plperl cache functions using just a bool for is_trigger
Date: 2010-11-02 00:40:00
Message-ID: AANLkTi=BK6FGvLRpMrC1uZw8hTFACKzn1hgTDGUs_Vr3@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Nov 1, 2010 at 16:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alex Hunsaker <badalex(at)gmail(dot)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.

Attachment: pltcl_rm_tgrelod_key_v2.patch
Description: text/x-patch (3.5 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Andres FreundDate: 2010-11-02 00:44:29
Subject: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Previous:From: Andres FreundDate: 2010-11-02 00:37:43
Subject: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group