| От | GH |
|---|---|
| Тема | Two tables refenceing each other's columns |
| Дата | |
| Msg-id | 20010102005746.C46834@over-yonder.net обсуждение исходный текст |
| Ответы |
Re: Two tables refenceing each other's columns
Re: Two tables refenceing each other's columns |
| Список | pgsql-general |
Is something like the following allowed (or is not a Bad Idea)? table1 ---------+------------------------- id1 |serial primary key col2 |int references table2(id2) table2 ---------+------------------------- id2 |serial primary key col2 |int references table1(id1) Obviously, creating the tables is a problem since the constraints require that the other table exists. If doing the above is *not* a Bad Idea, how could I work around this problem? (That is, (how) can I add the constraints after table creation? I imagine something with "create constraint trigger", but the manual is not very clear on that.) Thanks dan
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера