Re: 7.4 - TODO : alter table drop foreign key

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: 7.4 - TODO : alter table drop foreign key
Дата
Msg-id 20021205085915.F2247-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: 7.4 - TODO : alter table drop foreign key  ("Dan Langille" <dan@langille.org>)
Ответы Re: 7.4 - TODO : alter table drop foreign key  ("Dan Langille" <dan@langille.org>)
Список pgsql-hackers
On Thu, 5 Dec 2002, Dan Langille wrote:

> Found the solution:
>
> drop trigger "RI_ConstraintTrigger_4278488" on watch_list_staging;

Actually there are three triggers for the constraint.  You may have
dangling triggers on the other table of the constraint.  It's one on the
table the constraint's defined on and two on the referenced table.

> Given that the FK in question did not have a name to start with, I
> concede that it would be difficult to code DROP FOREIGN KEY.
>
> What about supporting ALTER TABLE <table> ADD FOREIGN KEY <keyname>
> ... which at present we don't?  That would then make dropping the FK
> a simple coding issue?

ISTM, that'sALTER TABLE <table> ADD CONSTRAINT <name> FOREIGN KEY ...
which should be there in any 7.x.

And the drop constraint for foreign keys (and the \d display stuff) is new
in 7.3.



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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [GENERAL] PostgreSQL Global Development Group
Следующее
От: "Dan Langille"
Дата:
Сообщение: Re: 7.4 - TODO : alter table drop foreign key