On Wed, 7 Mar 2001, Stephan Szabo wrote:
>
> You cannot safely reference tops of inheritance trees under 7.0 or 7.1 and
> have it reference the trees.
>
Is there anyway to emulate this? I want to have several types of persons
which have varied and common data. How can I implement refences to a
person or a child table of person? Are there any problems with the parent
having a serial column? The index should be unique for all the children
too.
CRETE TABLE person (
id SERIAL,
fname varchar(15),
lname varchar(15),
pwd varchar(8)
);
CREATE TABLE teacher (
uname char(4)
) INHERITS (person);
CREATE TABLE admin (
uname char(8),
type integer
) INHERITS (person);
CREATE TABLE record (
id SERIAL,
pid integer REFERENCES person
);
- Einar Karttunen