Re: [GENERAL] Table inheritance foreign key problem

2010-12-22 Thread Tom Lane
Richard Broersma richard.broer...@gmail.com writes: On Tue, Dec 21, 2010 at 9:32 PM, Andy Chambers achamb...@mcna.net wrote: create table guidebooks ( city check (city in (select name from cities)), This is a nice idea. They only problem is that PostggreSQL doesn't

Re: [GENERAL] Table inheritance foreign key problem

2010-12-22 Thread David Fetter
On Wed, Dec 22, 2010 at 12:32:44AM -0500, Andy Chambers wrote: Hi, One of the caveats described in the documentation for table inheritance is that foreign key constraints cannot cover the case where you want to check that a value is found somewhere in a table or in that table's descendants.

[GENERAL] Table inheritance foreign key problem

2010-12-21 Thread Andy Chambers
Hi, One of the caveats described in the documentation for table inheritance is that foreign key constraints cannot cover the case where you want to check that a value is found somewhere in a table or in that table's descendants. It says there is no good workaround for this. What about

Re: [GENERAL] Table inheritance foreign key problem

2010-12-21 Thread Richard Broersma
On Tue, Dec 21, 2010 at 9:32 PM, Andy Chambers achamb...@mcna.net wrote: \ create table guidebooks (  city check (city in (select name                         from cities)),  isbn text,  author text,  publisher text); This is a nice idea. They only problem is that PostggreSQL doesn't