Re: turn off auto index for foreign key

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: turn off auto index for foreign key
Дата
Msg-id 34d269d40806092158vc3069e7gfd58166dee46aa2c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: turn off auto index for foreign key  ("Tommy Cheng" <csckcac@gmail.com>)
Ответы Re: turn off auto index for foreign key  ("Tommy Cheng" <csckcac@gmail.com>)
Список pgsql-admin
On Mon, Jun 9, 2008 at 10:17 PM, Tommy Cheng <csckcac@gmail.com> wrote:
> you are right. I double checked. So, is there any way to turn off auto index
> creation for the parent? (the best is changing postgresql database setting)
> I am using postgres (PostgreSQL) 8.1.9 on CentOS 5 x86_64
>

Again, there is no auto index creation for foriegn keys.  However if
you declared the column unique or its the pkey (ala unique) (As Scott
said) then there will  an index.

No you cant turn it off because its how postgres enforces uniqueness
see http://www.postgresql.org/docs/8.1/interactive/index-unique-checks.html
for more

My guess, use the name of the index to try to distinguish.  Auto
generated ones will always be in the form:
pkey: <table_name>_pkey(num)
unique: <table_name>_<column_name>_key(num)

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

Предыдущее
От: "Tommy Cheng"
Дата:
Сообщение: Re: turn off auto index for foreign key
Следующее
От: "Tommy Cheng"
Дата:
Сообщение: Re: turn off auto index for foreign key