When an index and a constraint have the same name...

Поиск
Список
Период
Сортировка
От jason@buberel.org
Тема When an index and a constraint have the same name...
Дата
Msg-id cone.1170177537.231256.22765.1001@bunny
обсуждение исходный текст
Ответы Re: When an index and a constraint have the same name...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Seems as though I've gotten myself into something of a pickle:

I wound up with a fkey constraint and an index on the same table having the
same name ('rs_fkey').

The result is an error message when I try to drop the table (cascade) or
even drop the constraint:

# alter table report_specification drop constraint rs_pkey;
NOTICE:  constraint pr_rs on table purchase_record depends on index rs_pkey
ERROR:  "rs_pkey" is an index

and then there is:

# drop index rs_pkey;
ERROR:  cannot drop index rs_pkey because constraint rs_pkey on table
report_specification requires it
HINT:  You may drop constraint rs_pkey on table report_specification instead.

Is there some name-spacing trick I can use to selectively drop the index or
the constraint in a way that postgres (using v8.1) will let me get away with
it?

Thanks,
Jason


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

Предыдущее
От: "codeWarrior"
Дата:
Сообщение: Re: SQL to get a table columns comments?
Следующее
От: Tony Caduto
Дата:
Сообщение: Any Plans for cross database queries on the same server?