From: Richard Huxton <dev@archonet.com>
To: Moritz Kobel <mailinglists@weisshorn.kobelnet.ch>
Cc: pgsql-sql@postgresql.org
Subject: Re: Table inherit & foreign key problem
Date: Fri, 09 Mar 2007 12:35:11 +0000
Message-ID: <45F1547F.4070105@archonet.com> (raw)
In-Reply-To: <20070309114303.GC12129@alvier.kobelnet.intra>
References: <20070309114303.GC12129@alvier.kobelnet.intra>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, mailinglists@weisshorn.kobelnet.ch
Subject: Re: Table inherit & foreign key problem
In-Reply-To: <45F1547F.4070105@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox