Cascaded updates / deletes don't work on inherited tables
От | Michael Barber |
---|---|
Тема | Cascaded updates / deletes don't work on inherited tables |
Дата | |
Msg-id | 000501c1f529$d723b3b0$0100000a@michael обсуждение исходный текст |
Ответы |
Re: Cascaded updates / deletes don't work on inherited
|
Список | pgsql-novice |
If I create a table with a primary key and then I reference that column from another table, the cascaded updates and deletes work without any problem. However, if I then create a table that inherits the previous one, the cascaded deletes and updates only affect the original (parent) table -- the records in the new (child) table remain unaffected. To be honest, I really don't know all that much about SQL standards, but I would have thought that since just about all the characteristics of the parent table are inherited, then surely the triggers would be as well. If I create a table with a primary key and then I reference that column from another table, the cascaded updates and deletes work without any problem. However, if I then create a table that inherits the previous one, the cascaded deletes and updates only affect the original (parent) table -- the records in the new (child) table remain unaffected. To be honest, I really don't know all that much about SQL standards, but I would have thought that since just about all the characteristics of the parent table are inherited, then surely the triggers would be as well. Apart from that, I'm not too sure how to perform the cascaded deletes or updates with a SQL instruction, so if someone could help me with that, I'd really appreciate it. There must be a 'standard' way to do it ;-) Michael S. Barber | | mbarber@netraver.org.za | ICQ 3233720 | +27 (0)11 7875110 (landline) | +27 (0)83 2260428 (cellular)
В списке pgsql-novice по дате отправления: