Re: FOREIGN KEY AND INDEXEX

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: FOREIGN KEY AND INDEXEX
Дата
Msg-id 200810281426.43844@hal.medialogik.com
обсуждение исходный текст
Ответ на FOREIGN KEY AND INDEXEX  ("JORGE MALDONADO" <jorgemal1960@gmail.com>)
Список pgsql-novice
On Tuesday 28 October 2008, "JORGE MALDONADO" <jorgemal1960@gmail.com>
wrote:
> I need to define an index for a table but such an index already exists as
> a foreign key.
> I have fk_state (a foreign key) and I need a common index (ix_state).
> Should I define the index or does the foreign key work like an index too?

You need the index. Primary keys and unique constraints are implemented as
indexes, but not foreign keys.

--
Alan

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

Предыдущее
От: "JORGE MALDONADO"
Дата:
Сообщение: FOREIGN KEY AND INDEXEX
Следующее
От: Marcin Krol
Дата:
Сообщение: the cost of logging statements