Re: Foreign key referencing subclasses.

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Johannes Grødem <johs(at)copyleft(dot)no>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Foreign key referencing subclasses.
Date: 2001-03-22 17:31:59
Message-ID: Pine.BSF.4.21.0103220929490.41849-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Thu, 22 Mar 2001, [iso-8859-1] Johannes Grdem 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).

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2001-03-22 19:48:19 Re: creating "job numbers"
Previous Message Stephan Szabo 2001-03-22 17:29:04 Re: CHAR or VARCHAR