Beautifier - WITH clauses within inline view

I've noticed a problem with the beautifier when WITH clauses are wrapped in an inline view (a slightly unusual construction perhaps, but it does appear in some of the code we have).

The beautifier reformats this:

Code:
select *
from   ( with t1 as (select dummy from dual)
            , t2 as (select dummy from dual)
            , t3 as (select dummy from dual)
         select t1.* from t1, t2, t3 )

into this:

Code:
select *
from   (with t1 as (select dummy
                    from   dual), t2 as (select dummy
                                         from   dual), t3 as (select dummy
                                                              from   dual)
          select t1.*
          from   t1
                ,t2
                ,t3)

If there are several WITH clauses, they quickly disappear off to the right margin.

If they are not nested in an inline view, the beautifier stacks them vertically as specified in my preference settings (more or less - it's not using the leading comma I specified, but it's close enough I suppose):

Code:
with t1 as
 (select dummy
  from   dual),
t2 as
 (select dummy
  from   dual),
t3 as
 (select dummy
  from   dual)
select t1.*
from   t1
      ,t2
      ,t3

Could this be added to your to-do list?

Thanks...
 
Back
Top