Sometimes, I want to move procedures / functions between packages. Let's say I have a package TOOLS and I would like to move a TOOLS.UTILITY function to UTILS. It would be great if such a refactoring was offered by SQL Developer.
In Eclipse, there are at least two types of moving procedures:
- Moving a procedure completely, updating all the callers to call the procedure at the new location
- Creating a new procedure at the new location, containing the body, keeping the old procedure at its place and delegating calls to the new procedure
In PL/SQL, there might be an additional caveat when moving a private or standalone procedure to another package (in case of which it will need to be automatically added to the target package specification). In the inverse case, when moving a procedure with a package specification to become a standalone procedure, the specification needs to be deleted as well.