Re: FK triggers misused?

From: Andrew - Supernews
Subject: Re: FK triggers misused?
Date: ,
Msg-id: slrnf258g3.10cj.andrew+nonews@atlantis.supernews.net
(view: Whole thread, Raw)
In response to: FK triggers misused?  (cluster)
Responses: Re: FK triggers misused?  (cluster)
List: pgsql-performance

Tree view

FK triggers misused?  (cluster, )
 Re: FK triggers misused?  (Tom Lane, )
 Re: FK triggers misused?  (Andrew - Supernews, )
  Re: FK triggers misused?  (Tom Lane, )
 Re: FK triggers misused?  (Andrew - Supernews, )
  Re: FK triggers misused?  (cluster, )
   Re: FK triggers misused?  (Tom Lane, )
   Re: FK triggers misused?  (Tom Lane, )
    Re: FK triggers misused?  (cluster, )
 Re: FK triggers misused?  (cluster, )
  Re: FK triggers misused?  (Stephan Szabo, )

On 2007-04-15, Tom Lane <> wrote:
> Andrew - Supernews <> 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


pgsql-performance by date:

From: Andrew - Supernews
Date:
Subject: Re: FK triggers misused?
From: "Merlin Moncure"
Date:
Subject: Re: Basic Q on superfluous primary keys