Maintainability: is declaring serials as integers a problem?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Maintainability: is declaring serials as integers a problem?
Date: 2002-08-04 01:56:13
Message-ID: 3D4C89BD.6070007@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-08-04 02:19:36 Re: getpid() function
Previous Message Bruce Momjian 2002-08-04 01:11:55 Re: getpid() function