referencing a `serial' column as a foreign key

Arcady Genkin <a.genkin@utoronto.ca>

From: Arcady Genkin <a.genkin@utoronto.ca>
To: pgsql-novice@postgresql.org
Date: 2000-05-22T07:09:59Z
Lists: 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.