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

Re: FK's to refer to rows in inheritance child

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>, "w(dot)p(dot)dijkstra(at)mgrid(dot)net" <w(dot)p(dot)dijkstra(at)mgrid(dot)net>
Subject: Re: FK's to refer to rows in inheritance child
Date: 2010-12-01 16:16:37
Message-ID: 1291220197.2006.57.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2010-12-01 at 15:07 +0100, Yeb Havinga wrote:

> FK's cannot refer to rows in inheritance childs. With some changes in 
> LockRows, together with removing the ONLY keyword in ri_trigger.c, it 
> was possible to refer to the rows in child relations. (WIP patch attached)

This has a userspace solution, which seems preferable technically.

Just have an Object table that is referred to by all parts of the
hierarchy, maintained by triggers. With PK.

CASCADE doesn't work, but then that was an open issue there anyway.

-- 
 Simon Riggs           http://www.2ndQuadrant.com/books/
 PostgreSQL Development, 24x7 Support, Training and Services
 


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-12-01 16:17:19
Subject: Re: improving foreign key locks
Previous:From: Kevin GrittnerDate: 2010-12-01 16:15:38
Subject: Re: [HACKERS] Improved JDBC driver part 2

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