Re: foreign key constraints and inheritence - Mailing list pgsql-general

From Michael Fuhr
Subject Re: foreign key constraints and inheritence
Date
Msg-id 20050717093525.GB88595@winnie.fuhr.org
Whole thread Raw
In response to foreign key constraints and inheritence  (Garrett Kalleberg <experimental@metadada.com>)
Responses Re: foreign key constraints and inheritence
List pgsql-general
On Sat, Jul 16, 2005 at 05:39:59PM -0400, Garrett Kalleberg wrote:
>
> Now, the rec with id '1234' is in the table
> invoicelineiteminventorytypes, but I can't wrap my head around the
> fact that
>
> SELECT invoicelineitemtypeid FROM invoicelineitemtypes
>
> yields the rec with invoicelineitemtypeid '1234', yet I can't
> reference it in the invoicelines INSERT statement.

See the inheritance documentation:

http://www.postgresql.org/docs/8.0/static/ddl-inherit.html

"A serious limitation of the inheritance feature is that indexes
(including unique constraints) and foreign key constraints only
apply to single tables, not to their inheritance children.  This
is true on both the referencing and referenced sides of a foreign
key constraint."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Ron Mayer
Date:
Subject: Re: How to create unique constraint on NULL columns
Next
From: "Sander Steffann"
Date:
Subject: Re: foreign key constraints and inheritence