Re: table constraints vs column

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: table constraints vs column
Дата
Msg-id 20030926135757.GA24359@wolff.to
обсуждение исходный текст
Ответ на table constraints vs column  (Jodi Kanter <jkanter@virginia.edu>)
Список pgsql-admin
On Fri, Sep 26, 2003 at 08:35:54 -0400,
  Jodi Kanter <jkanter@virginia.edu> wrote:
> Is there any argument to support using table constraints over column
> constraints in a situation where there are no PKs or FK references that
> are composed of more than one column?

Functionally they should be the same, so I think it is more of a style
issue.

> Is the automatic PK index generated on for table constraints or for either?
> Jodi

Foreign key references do not create indexes. There already needs to be
an existing unique index (primary key will generate a unique index) on
the table being referenced or the constraint creation will fail. Optionally
you may also want to create an index on the referencing columns if you will
be doing lots of deletes (and I think updates before 7.4) on the referenced
table.

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Chad R. Larson"
Дата:
Сообщение: Re: Fw: Case Insensitive Test
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Fw: Case Insensitive Test