PL/SQL Beautifier…

 

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.

Cheers

Tim…

Author: Tim...

DBA, Developer, Author, Trainer.

3 thoughts on “PL/SQL Beautifier…”

  1. I started writing a comment, but it was too long for here. I couldn’t agree more with what you say. If you’d like to see my thoughts, go here.

  2. Eddie Awad was also talking about sql formatting here.
    I use TOAD to format sql, no problem with that so far. But sure it will be perfect if Oracle supplies a built-in one.

Comments are closed.