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 descend

Re: [GENERAL] Table inheritance foreign key problem

2010-12-22 Thread Tom Lane
Richard Broersma writes: > On Tue, Dec 21, 2010 at 9:32 PM, Andy Chambers 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 > support sub-selects in a tables che

Re: [GENERAL] Table inheritance foreign key problem

2010-12-21 Thread Richard Broersma
On Tue, Dec 21, 2010 at 9:32 PM, Andy Chambers 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 support sub-select