| От | Richard Huxton |
|---|---|
| Тема | Re: Modifying FK constraints |
| Дата | |
| Msg-id | 41924E6C.8050400@archonet.com обсуждение исходный текст |
| Ответ на | Modifying FK constraints ("Oleg Lebedev" <oleglebedev@waterford.org>) |
| Список | pgsql-general |
Oleg Lebedev wrote: > Greetings. > > Is it possible to modify a foreign key constraint and force it to > cascade on update? If there is no such SQL command, then is it possible > to update some system tables to accomplish this? BEGIN; ALTER TABLE t1 DROP CONSTRAINT ... ALTER TABLE t1 ADD CONSTRAINT ... COMMIT; Note that this will trigger a re-examination of all the values to check the constraint is valid. Also you may have to quote constraint names. If they are generated as $1 you will need to refer to them as "$1". Full details in the "SQL Commands" chapter under "ALTER TABLE" -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера