pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Stefan Scheidegger <Stefan.Scheidegger@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: REFERENCES and INHERITS restrictions?
Date: Wed, 27 Feb 2008 14:04:43 +0000
Message-ID: <87pruifqbo.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <20080227092559.261470@gmx.net>
References: <20080227092559.261470@gmx.net>

"Stefan Scheidegger" <Stefan.Scheidegger@gmx.net> 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!



view thread (2+ messages)

Message-ID: <87pruifqbo.fsf@oxford.xeocode.com>
Permalink:  ../87pruifqbo.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87pruifqbo.fsf@oxford.xeocode.com

 · 

reply

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: stark@enterprisedb.com, Stefan.Scheidegger@gmx.net
  Subject: Re: REFERENCES and INHERITS restrictions?
  In-Reply-To: <87pruifqbo.fsf@oxford.xeocode.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