I think Oracle should include an SQL and PL/SQL beautifier (formatter) in the next version of the engine. I know there are lots of third party tools to do this, but it would be nice to produce readable output from queries against the v$ views, rather than having to cut & paste blocks of SQL output into a 3rd party tool to format it.
Why put it in the engine?
Remember the days when everyone and their dog had scripts to pull out object definintions from the database by querying the data dictionary? It became a real pain keeping them up to date, so Oracle released the DBMS_METADATA package so each version of the engine had the correct method for returning the object definintions.
In the same way, each version of the engine comes with new and modified syntax, which will often require modifications to beautifier code. Put it on the database, and let external tools access it. Added to that, it would solve my problem that prompted this post.
I’m sure they already have the code in Raptor. If they don’t want to write it in PL/SQL, they could always wrap up the Java code as a Java Stored procedure and make it available from the engine.