Articles Related
How
Update a record in the primary key
how can I update a record in the primary key field which behaves as a foreign key to other tables without altering (disabling) the primary/foreign constraint?
If you create the foreign keys “deferrable”, you can
set constraints deferred;
update parent_table;
update child_table(s);
commit;
and the constraint will be verified at the commit instead of at the statement level, allowing you to “cascade” the update yourself.