Re: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT |
| Дата | |
| Msg-id | 3971.1033140825@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT (pgsql-bugs@postgresql.org) |
| Список | pgsql-bugs |
pgsql-bugs@postgresql.org writes:
> CREATE TABLE t1 (
> col_a int,
> PRIMARY KEY (col_a)
> );
> --DROP INDEX t1_pkey CASCADE WILL NOT CASCADE THE DROP TO DEPENDENT OBJECTS
> DROP INDEX t1_pkey CASCADE;
> --ALTER TABLE .. DROP .. CASCADE WILL CASCADE THE DROP TO THE FOREIGN KEY CONSTRAINT
> ALTER TABLE t1 DROP CONSTRAINT t1_pkey CASCADE;
This is deliberate: you created the index indirectly via a constraint,
so you should drop the constraint rather than dropping the index itself.
Essentially, the index is only an implementation detail that you should
not be messing with directly.
Or at least that was the design idea. If you think this is wrongheaded,
feel free to start a discussion about it on pghackers.
It might be that the behavior is okay but the error message should be
phrased differently in this case. Any thoughts?
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера