Maintainability: is declaring serials as integers a problem? - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Maintainability: is declaring serials as integers a problem?
Date
Msg-id 3D4C89BD.6070007@mega-bucks.co.jp
Whole thread Raw
Responses Re: Maintainability: is declaring serials as integers a problem?
List pgsql-general
I have tables that have seirals as primary keys. Other tables uses these
as foreign keys. In terms of future maintainability is it best to
declare the foreign key as:

1- id  integer  references other_table

or

2- id  serial  references other_table

I'm a bit bit confused is a foreign key can (should) be declared as type
integer or serial.

Thanks!

jc


pgsql-general by date:

Previous
From: "Johnson, Shaunn"
Date:
Subject: Re: saving a view with pg_dump
Next
From: "Leland F. Jackson, CPA"
Date:
Subject: Re: Maintainability: is declaring serials as integers a problem?