Maintainability: is declaring serials as integers a problem?

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема Maintainability: is declaring serials as integers a problem?
Дата
Msg-id 3D4C89BD.6070007@mega-bucks.co.jp
обсуждение исходный текст
Ответы Re: Maintainability: is declaring serials as integers a problem?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: saving a view with pg_dump
Следующее
От: "Leland F. Jackson, CPA"
Дата:
Сообщение: Re: Maintainability: is declaring serials as integers a problem?