Re: viewing/altering the "ON DELETE CASCADE" constraint
| От | Stephan Szabo |
|---|---|
| Тема | Re: viewing/altering the "ON DELETE CASCADE" constraint |
| Дата | |
| Msg-id | 20020722103016.L14333-100000@megazone23.bigpanda.com обсуждение исходный текст |
| Ответ на | viewing/altering the "ON DELETE CASCADE" constraint (Jon Lapham <lapham@extracta.com.br>) |
| Список | pgsql-general |
On Mon, 22 Jul 2002, Jon Lapham wrote: > Hello All- > > I'm sure this is a FAQ, but I cannot find anything in the docs that > directly addresses this. > > How can I determine if a column 1) has a foreign key constraint, and 2) > if that fkey constraint includes "ON DELETE CASCADE"? I've tried the > various "\d"-type commands in psql to no avail. > > Finally, assuming you have a column that *has* a fkey constraint, but > not the additional "ON DELETE CASCADE" portion, how would you go about > adding "ON DELETE CASCADE" to the column? The best place to get info on this is at http://techdocs.postgresql.org/ There are a few things on referential integrity there that I believe describe how to get the info on the constraints. As for changing the constraint, you'll probably need to drop the constraint (dropping the triggers) and then add it with alter table add constraint probably.
В списке pgsql-general по дате отправления: