Re: Table inherit & foreign key problem - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Table inherit & foreign key problem
Date
Msg-id 45F1547F.4070105@archonet.com
Whole thread Raw
In response to Table inherit & foreign key problem  (Moritz Kobel <mailinglists@weisshorn.kobelnet.ch>)
List pgsql-sql
Moritz Kobel wrote:
> i would like to reference to the element table, because i have some
> tables which inherit from element and i would like to add comments to
> these elements.
> 
> is this impossible or did i do a silly mistake? i did not find a
> solution unsing google.

Foreign-key limitations with inheritance I'm afraid. See the manuals for 
details:

http://www.postgresql.org/docs/8.2/static/ddl-inherit.html
5.8.1 Caveats
...
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. Thus, 
in the terms of the above example:
...

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Re: SHA-1 vs MD5
Next
From: "Chad Wagner"
Date:
Subject: Re: SHA-1 vs MD5