Re: Trigger with WHEN clause (WIP)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trigger with WHEN clause (WIP)
Date: 2009-10-15 14:53:15
Message-ID: 29377.1255618395@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2009/10/15 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> This seems to me to be a lot of code to accomplish nothing useful.

> I disagree. When I analysed speed of some operations, I found some
> unwanted trigger calls should to slow down applications. I am for any
> method, that could to decrease trigger calls.

That argument is based on a completely evidence-free assumption, namely
that this patch would make your case faster. Executing the WHEN tests
is hardly going to be zero cost. It's not too hard to postulate cases
where implementing a filter this way would be *slower* than doing it
inside the trigger.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-10-15 14:53:20 Re: [PATCH] Largeobject access controls
Previous Message Tom Lane 2009-10-15 14:50:06 Re: Client application name