Bernhard S
Member³
PL/SQL Developer seems to be currently unaware of the constraint renaming syntax (see: 11g Docu: Alter Table Syntax )
When you rename a constraint using "Edit Table" PL/SQL Developer (PSD) generates the following:
This has the disadvantage, that depending objects might get invalidated ( see: Docu 11g: Admin Guide ).
I'm also missing a rename context option in object browser for constraints. When you compare constraints that are differently named in different schemas, PSD also drops and recreates the existing constraint instead of using the rename syntax.
SQL:
alter table [TABLE] rename constraint <current_constraint_name> to <new_constraint_name>;
When you rename a constraint using "Edit Table" PL/SQL Developer (PSD) generates the following:
SQL:
alter table [TABLE] drop constraint <current_constraint_name>;
alter table [TABLE] add constraint <new_constraint_name> <old_constraint_definition>;
This has the disadvantage, that depending objects might get invalidated ( see: Docu 11g: Admin Guide ).
I'm also missing a rename context option in object browser for constraints. When you compare constraints that are differently named in different schemas, PSD also drops and recreates the existing constraint instead of using the rename syntax.