Re: referencial conlumn contraints and inheritance

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Stuart <sfbarbee(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: referencial conlumn contraints and inheritance
Date: 2001-10-14 23:08:07
Message-ID: Pine.BSF.4.21.0110141601120.8752-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sun, 14 Oct 2001, Stuart wrote:

> Then a destination table set up with a field referencing areas.
> Currently postgres appears not to support reference contraints checking
> through inherited tables. Nor does it appear to support subselects in check
> constraints. It would be nice to allow reference checking through the
> inherited tables so destination.area_id would be valid for any country,
> state, or city area_id entered.

This isn't currently supported, and probably isn't going to be supported
for a version or two at least. There are some problems in the current
inheritance scheme (for example, IIRC your primary key is also not
inherited, and even if you define one on the child it won't stop you from
having duplicates between the tables) and this is one of them. The work
to do this isn't so huge, but there are some issues about inheriting the
triggers that would need to be sat down and thought about.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message guard 2001-10-15 01:56:26 Re: to_char()??
Previous Message Lee Harr 2001-10-14 21:37:36 Re: to_char()??