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

Re: RI checks during UPDATEs

From: Jim Nasby <decibel(at)decibel(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RI checks during UPDATEs
Date: 2007-02-02 05:10:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Jan 30, 2007, at 1:17 PM, Simon Riggs wrote:
> It would be even better if there was some way of not executing the
> trigger at all if we knew that the UPDATE statement doesn't SET the FK
> columns.

Other databases allow you to put a WHERE or CHECK clause on triggers,  
so that they will only fire if that evaluates to true. That would  
allow FK triggers to be defined as


and would obviously have other uses as well. Of course the question  
is how much time that would save vs just doing the same check in the  
trigger function itself.
Jim Nasby                                            jim(at)nasby(dot)net
EnterpriseDB      512.569.9461 (cell)

In response to

pgsql-hackers by date

Next:From: David FetterDate: 2007-02-02 05:11:42
Subject: Re: writing new regexp functions
Previous:From: Jim NasbyDate: 2007-02-02 05:02:50
Subject: Re: [HACKERS] Talks for OSCON? Only 5 days left!

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