Cascaded updates / deletes don't work on inherited tables - Mailing list pgsql-novice

From Michael Barber
Subject Cascaded updates / deletes don't work on inherited tables
Date
Msg-id 000501c1f529$d723b3b0$0100000a@michael
Whole thread Raw
Responses Re: Cascaded updates / deletes don't work on inherited
List 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 by date:

Previous
From: Wendy Powley
Date:
Subject: Stored Procedures
Next
From: Hans Plum
Date:
Subject: ERROR: $1 is declared CONSTANT in plpgsql