From: Dutt Kalapatapu <dutt@eudoramail.com>
To: pgsql-interfaces@postgreSQL.org
Cc: pgsql-sql@postgreSQL.org
Cc: dutt@pacbell.net
Subject: Question on Inheritance and Primary Keys.
Date: Mon, 11 Oct 1999 12:26:38 -0700
Message-ID: <3.0.6.32.19991011122638.009aa3e0@pop.eudoramail.com> (raw)
I have two Tables:
TableA(
parameterone int,
parametertwo int,
PRIMARYKEY(parameterone),
UNIQUE(parameterone)
);
TableB(
parameterthree int
)INHERITS(TableA);
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. But when I insert two duplicate keys in
TableA then it complains. This means that Inheritance removes the
primarykey etc from the inherited table??? I couldn't think why this object
oriented behaviour doesn't work here.
Can some one explain this behaviour.
Thanks
Dutt
--Dutt Kalapatapu
________________________
|ipVerse Inc., |
|1901 Landings Drive |
|Mountain View, CA-94043 |
|Telefono: 650 919 0647 |
|________________________|
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: dutt@eudoramail.com, pgsql-interfaces@postgreSQL.org, dutt@pacbell.net
Subject: Re: Question on Inheritance and Primary Keys.
In-Reply-To: <3.0.6.32.19991011122638.009aa3e0@pop.eudoramail.com>
References: <3.0.6.32.19991011122638.009aa3e0@pop.eudoramail.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