| От | Peter Harvey |
|---|---|
| Тема | FOREIGN KEY after CREATE TABLE? |
| Дата | |
| Msg-id | 3B8828BE.8EF3D137@codebydesign.com обсуждение исходный текст |
| Ответы |
Re: FOREIGN KEY after CREATE TABLE?
|
| Список | pgsql-hackers |
How can i add foreign keys after the CREATE TABLE? Is there some combination of other SQL commands that will do the trick? My problem is; a. that I have a circular reference between 3 tables b. that I must be able to reverse engineer the resulting references in the shema by querying for foreign keys Right now I am calculating a dependency hierarchy and generating tables in the resulting order but this does not work for a circular ref. Aside from the circular ref issues... i think it would be easier and safer to be able to generate all of the tables in one pass (with primary key defs) and then add the foreign keys in a second pass. Any help appreciated. Peter
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера