Re: FK triggers misused?

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: FK triggers misused?
Date: 2007-04-15 22:06:59
Message-ID: slrnf258g3.10cj.andrew+nonews@atlantis.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 2007-04-15, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew - Supernews <andrew+nonews(at)supernews(dot)com> writes:
>> Looking at current CVS code the RI check seems to be skipped on update of
>> the _referred to_ table if the old and new values match, but not on update
>> of the _referring_ table.
>
> No, both sides are supposed to be tested, see lines 3350-3395 in
> src/backend/commands/trigger.c. Or do you see something broken there?
> It works for me in a quick test.

Hm, you're right; I was looking at the logic in the triggers themselves
(in ri_triggers.c).

So the next question is, what pg version is the original poster using?
because 8.1.x doesn't report trigger execution times, and 8.2.x would use
a single bitmap index scan with an = ANY condition, not a BitmapOr.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2007-04-16 13:03:42 Re: Basic Q on superfluous primary keys
Previous Message Tom Lane 2007-04-15 15:22:43 Re: FK triggers misused?