Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 65A192E0059 for ; Wed, 27 Feb 2008 10:04:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 33212-02 for ; Wed, 27 Feb 2008 10:04:47 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [62.232.55.118]) by postgresql.org (Postfix) with ESMTP id 143812E0049 for ; Wed, 27 Feb 2008 10:04:47 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1JUMto-0003lx-2y; Wed, 27 Feb 2008 14:04:44 +0000 To: "Stefan Scheidegger" Cc: Subject: Re: REFERENCES and INHERITS restrictions? In-Reply-To: <20080227092559.261470@gmx.net> (Stefan Scheidegger's message of "Wed\, 27 Feb 2008 10\:25\:59 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.sql" 2020) References: <20080227092559.261470@gmx.net> From: Gregory Stark Organization: EnterpriseDB Date: Wed, 27 Feb 2008 14:04:43 +0000 Message-ID: <87pruifqbo.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/222 X-Sequence-Number: 30313 "Stefan Scheidegger" writes: > Why is this not possible? It seems that this is about inheritance. When I > reference directly to tbl_child1, everything works just fine. I'm afraid inheritance doesn't work with foreign key references. You can have references to specific tables but they don't include any child tables. A related limitation is that you can't enforce unique constraints across tables and their children. Solving this doesn't seem to be high on anyone's priority list. If anything what interests more people is using inheritance for partitioning support. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support!