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

Re: ON DELETE SET NULL clauses do error when more than two columns are referenced to one table

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: ON DELETE SET NULL clauses do error when more than two columns are referenced to one table
Date: 2007-08-13 13:10:40
Message-ID: 87y7gfshpr.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
"Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> writes:

> I'm not sure what to do about this. We could change the order the
> triggers are fired to breadth-first. If all the setnull triggers were
> executed first, there would be no problem. But that seems like a pretty
> big change, and I'm afraid it might have other unintended consequences.

We could also check the queued triggers to see if there really is a trigger
which will be invalidated by the second update and therefore needs to be
rechecked (or even just change the tid of the existing queued check). I don't
know what it would take to make that efficient though.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

In response to

pgsql-bugs by date

Next:From: Brian HirtDate: 2007-08-13 13:43:26
Subject: Re: failed to re-find parent key in "..." for deletion target page
Previous:From: Heikki LinnakangasDate: 2007-08-13 12:32:42
Subject: Re: ON DELETE SET NULL clauses do error when more than two columns are referenced to one table

pgsql-patches by date

Next:From: Tom LaneDate: 2007-08-13 14:44:22
Subject: Re: ON DELETE SET NULL clauses do error when more than two columns are referenced to one table
Previous:From: Heikki LinnakangasDate: 2007-08-13 12:32:42
Subject: Re: ON DELETE SET NULL clauses do error when more than two columns are referenced to one table

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