pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: cluster <skrald@amossen.dk>
Cc: pgsql-performance@postgresql.org
Subject: Re: FK triggers misused?
Date: Sat, 21 Apr 2007 09:18:16 -0700 (PDT)
Message-ID: <20070421090141.R65163@megazone.bigpanda.com> (raw)
In-Reply-To: <f0cppe$2vr0$1@news.hub.org>
References: <eve6md$1cjo$1@news.hub.org>
	<f0cppe$2vr0$1@news.hub.org>


On Sat, 21 Apr 2007, cluster wrote:

> I have investigated a bit now and found the following:
>
> When I perform the update the *first* time, the triggers are actually
> not evaluated. But from the second update they are.

Are these in one transaction? If so, then right now after the first
update, the remaining updates will trigger checks if the row modified was
modified in this transaction.  The comment in trigger.c lists the basic
circumstance, although it mentions it in terms of insert and a deferred
FK, I would guess that if there's ever a possibility of two modifications
(including multiple updates or on an immediate constraint) before the
constraint check occurred the same condition could happen.



view thread (11+ messages)

Message-ID: <20070421090141.R65163@megazone.bigpanda.com>
Permalink:  ../20070421090141.R65163@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20070421090141.R65163@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, skrald@amossen.dk
  Subject: Re: FK triggers misused?
  In-Reply-To: <20070421090141.R65163@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox