Inheritance: problems with primary key

From: camilarrocha(at)hotmail(dot)com (Camila Rocha)
To: pgsql-general(at)postgresql(dot)org
Subject: Inheritance: problems with primary key
Date: 2002-10-03 12:31:52
Message-ID: 50da3813.0210030431.543d50b2@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

I'm having troubles with inheritance too. I've created a table,
"person", and it has a field "code" as its primary key.
After, I've created a table, "student", that inherits person. I wanted
too use the column person.code as the primary key in the students
table too, but I've noticed that, when I insert a student, the
uniqueness of the primary key is no granted. for example, I can insert
two students.code = "1"

How can I inherit the primary key too??

thankx,
Camila

PS: Sorry about the bad english, i'm brazilian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Camila Rocha 2002-10-03 12:34:29 Rows ordered
Previous Message Justin Clift 2002-10-03 12:26:16 OT: Looking to Open Source the Flash training material