Inheritance: problems with primary key - Mailing list pgsql-general

From camilarrocha@hotmail.com (Camila Rocha)
Subject Inheritance: problems with primary key
Date
Msg-id 50da3813.0210030431.543d50b2@posting.google.com
Whole thread Raw
Responses Re: Inheritance: problems with primary key  (Alvaro Herrera <alvherre@atentus.com>)
List 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

pgsql-general by date:

Previous
From: j_v_dsilva@www.com (joseph v d'silva)
Date:
Subject: Trouble compiling postgresql in hp-unix
Next
From: "Tommy"
Date:
Subject: .NET ODBC Driver