Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2009/10/15 Tom Lane <tgl@sss.pgh.pa.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