Re: Foreign key referencing subclasses. - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Foreign key referencing subclasses.
Date
Msg-id Pine.BSF.4.21.0103220929490.41849-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Foreign key referencing subclasses.  (Johannes Grødem <johs@copyleft.no>)
List pgsql-sql
On Thu, 22 Mar 2001, [iso-8859-1] Johannes Gr�dem wrote:

> Hi,
> 
> it seems I can't have a foreign key that references some subclass.  Postgres
> says it can't figure out what its primary key is.  The primary key is defined
> in the superclass.

Unique/primary key doesn't inherit to subclasses.

If you want to reference just soa_record, you can create the unique index
on soa_record.  If you want to do the entire tree, the fk stuff doesn't
support that (issues with inheriting the triggers mostly).




pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: CHAR or VARCHAR
Next
From: Jan Wieck
Date:
Subject: Re: creating "job numbers"