Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 049C59FB490 for ; Fri, 9 Mar 2007 08:38:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 49225-07 for ; Fri, 9 Mar 2007 08:38:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 003239FB8AB for ; Fri, 9 Mar 2007 08:38:22 -0400 (AST) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 91D1875519; Fri, 9 Mar 2007 12:35:11 +0000 (GMT) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 6F8DF2740CB; Fri, 9 Mar 2007 12:35:11 +0000 (GMT) Message-ID: <45F1547F.4070105@archonet.com> Date: Fri, 09 Mar 2007 12:35:11 +0000 From: Richard Huxton User-Agent: IceDove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: Moritz Kobel Cc: pgsql-sql@postgresql.org Subject: Re: Table inherit & foreign key problem References: <20070309114303.GC12129@alvier.kobelnet.intra> In-Reply-To: <20070309114303.GC12129@alvier.kobelnet.intra> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.204 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200703/100 X-Sequence-Number: 27738 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