Received: from station1.osa.org (rdu57-4-033.nc.rr.com [66.57.4.33]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9EBNmr01209 for ; Sun, 14 Oct 2001 07:23:48 -0400 (EDT) (envelope-from sfbarbee@yahoo.com) Received: from there (localhost.osa.org [127.0.0.1]) by station1.osa.org (Postfix) with SMTP id 02352E83 for ; Sun, 14 Oct 2001 07:28:31 -0400 (EDT) Content-Type: text/plain; charset="iso-8859-1" From: Stuart Reply-To: sfbarbee@yahoo.com To: pgsql-sql@postgresql.org Subject: referencial conlumn contraints and inheritance Date: Sun, 14 Oct 2001 07:28:31 -0400 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011014112832.02352E83@station1.osa.org> X-Archive-Number: 200110/171 X-Sequence-Number: 5126 Folks,   I am not sure where to post this.  This may be more of a wishlist item than a usage question.  I am new to postgresql 7.1.  Table inheritance in postgres seems wonderfull.  Is there the capability now or any plans to extend support for inherited tables in column constraints. One example is a travel db where several tables are defined as: create table areas ( area_id char(10) primary key, name varchar(40), . description varchar(120) ); create table countries ( . . ) inherits (areas); create table states ( . country_id char(10) references countries ..., . . ) inherits (areas); create table cities ( . country_id char(10) references countries ..., . .) inherits (areas); 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. create table destination ( . area_id char(10) references areas ..., . .); Thanks, Stuart