Re: Foreign Key Columns And Indices

Поиск
Список
Период
Сортировка
Искать
От
Roderick A. Anderson
Тема
Re: Foreign Key Columns And Indices
Дата
Msg-id
Pine.LNX.4.10.10102041912350.19984-100000@tincan.org
Ответ на
Foreign Key Columns And Indices (Christopher Kings-Lynne)
Список
Дерево обсуждения
Foreign Key Columns And Indices "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: Foreign Key Columns And Indices Philip Warner <pjw@rhyme.com.au>
Re: Foreign Key Columns And Indices Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Foreign Key Columns And Indices Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Foreign Key Columns And Indices Jan Wieck <janwieck@Yahoo.com>
Re: Foreign Key Columns And Indices "Roderick A. Anderson" <raanders@tincan.org>
On Mon, 5 Feb 2001, Christopher Kings-Lynne wrote:

> Just a quick question, when a column of a table is defined to be a foreign
> key, is it implicitly indexed, or does one still need to explicitly CREATE
> INDEX?

I don't think you can actually declare the column in the table as a
foreign key.  A foreign key is a column or columns in another table.  For
a single column in the other table I'm pretty sure that column must be
'not null' and 'unique'.  An index - other than to inforce uniqueness
(currently how it's done in PostgreSQL?) - has nothing to do with the
foreign key.  Being a mere mortal - not a demi-god of PostgreSQLness - this could be
an over simplification or totally out to lunch.


Rod
-- 


В списке pgsql-hackers по дате отправления
От: Philip Warner
Дата:
От: m w
Дата:
Сообщение: contrib
FAQ