referencing a `serial' column as a foreign key - Mailing list pgsql-novice

From Arcady Genkin
Subject referencing a `serial' column as a foreign key
Date
Msg-id 87vh07giwo.fsf@tea.thpoon.com
Whole thread Raw
List pgsql-novice
What would be the correct data type for a foreign key column that
references a `serial' column in another table? E.g.:

create table labels ( labelid serial );
create table disks (
       diskid serial,
       labelid int4 references labels ( labelid ) );

The above works (serial is a 4-byte numerical type in 7.0), but I'm
concerned if this is the right way to do it... What if implementation
of `serial' type changes in future releases?

Thanks,
--
Arcady Genkin                                 http://www.thpoon.com
Nostalgia isn't what it used to be.

pgsql-novice by date:

Previous
From: "D. Duccini"
Date:
Subject: Re: opening old database
Next
From: Thomas Tynan
Date:
Subject: running Postgresql on Mandrake 7.0