Re: foreign key constraints and alter table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: foreign key constraints and alter table
Дата
Msg-id 17091.1045533281@sss.pgh.pa.us
обсуждение исходный текст
Ответ на foreign key constraints and alter table  (John DeSoi <jdesoi@planetc.com>)
Список pgsql-general
John DeSoi <jdesoi@planetc.com> writes:
> If I'm reading the docs correctly, I should be able to write:
> ALTER TABLE mytable ADD ptr INT4 REFERENCES othertable ON DELETE SET NULL
> but when I look in pg_constraint table (pg 7.3) I don't see any kind
> of foreign key constraint.

ALTER TABLE ADD COLUMN is dropping foreign key clauses in 7.3-7.3.2 :-(
See patch posted about four days ago.  In the meantime, add the foreign
key separately.

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Index not used with IS NULL
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Index not used with IS NULL