Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA34673; Mon, 11 Oct 1999 21:21:44 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA10279; Mon, 11 Oct 1999 21:21:02 -0400 (EDT) To: Dutt Kalapatapu cc: pgsql-interfaces@postgreSQL.org, pgsql-sql@postgreSQL.org, dutt@pacbell.net Subject: Re: [SQL] Question on Inheritance and Primary Keys. In-reply-to: Your message of Mon, 11 Oct 1999 12:26:38 -0700 <3.0.6.32.19991011122638.009aa3e0@pop.eudoramail.com> Date: Mon, 11 Oct 1999 21:21:02 -0400 Message-ID: <10277.939691262@sss.pgh.pa.us> From: Tom Lane Dutt Kalapatapu writes: > I expect from this that when we insert some thing in TableB then > parameterone should be unique, but the database is not enforcing the rule > and it takes duplicate values. Constraints and indexes aren't inherited; you have to redeclare them for each derived table. I agree this is a bug, or at least lack of a feature that ought to be there. It's on the TODO list, in fact: * Unique index on base column not honored on inserts from inherited table INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail [inherit] I don't know when it might get fixed. None of the currently active developers seem to be very interested in inheritance issues, so it could be a while before anyone decides to look at this problem. regards, tom lane