Skip site navigation (1) Skip section navigation (2)

Re: skip FK trigger on UPDATE

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: skip FK trigger on UPDATE
Date: 2005-05-30 02:55:16
Message-ID: 1117421716.23266.8.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-patches
On Sun, 2005-05-29 at 21:06 -0400, Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > Hmm, I suppose -- if you prefer I can have check_ins called by the 
> > INSERT trigger and check_upd called by the UPDATE trigger, which 
> > probably makes more sense.
> 
> Yeah ... I thought it was doing that already.

Attached are two patches: one that changes ADD FOREIGN KEY to create
separate ON INSERT and ON UPDATE triggers that invoke different trigger
functions, and a revised version of the FK UPDATE enqueuing patch.

BTW, the regression test failure was just stupidity on my part: I had
updated the "expected" results using the regression test output from
some intermediate version of the patch without checking it carefully
enough. The attached patch doesn't FK enqueuing patch doesn't cause any
unexpected regression test changes.

Barring any objections I'll apply both of these to HEAD today or
tomorrow.

-Neil


Attachment: fk_update_elide_check-7.patch
Description: text/x-patch (24.0 KB)
Attachment: fk_check_upd_trig-1.patch
Description: text/x-patch (4.6 KB)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2005-05-30 03:09:25
Subject: Re: skip FK trigger on UPDATE
Previous:From: ITAGAKI TakahiroDate: 2005-05-30 01:59:59
Subject: Re: O_DIRECT for WAL writes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group