Foreign keys don't work with inherited tables
От | Micah Yoder |
---|---|
Тема | Foreign keys don't work with inherited tables |
Дата | |
Msg-id | 01062313334801.01082@eclipse обсуждение исходный текст |
Ответы |
Re: Foreign keys don't work with inherited tables
|
Список | pgsql-bugs |
Using PostgreSQL 7.1.2 compiled with Red Hat 7.1's gcc 2.96. I have a database that uses inherited tables. The top level table of the hierarchy has a serial column, which is the primary key. Everything inserted into any of its decendents and each shares the primary key and sequence of the top table. That works fine. Another table (outside the hierarchy) uses a foreign key to the top level primary key. Inserting into this table works when the foreign key references an item that is in the TOP level class of the hierarchy. But when it references a subclass, I get a "referential integrity violation". Attached is a file with everything you should need to see what's up. Please let me know if you need more info, and if there are any workarounds. I guess I could not use a foreign key there but that would kind of suck ... Thanks, Micah -- Like to travel? http://TravTalk.org Micah Yoder Internet Development http://yoderdev.com
В списке pgsql-bugs по дате отправления: