[#5727] INSERT INTO table SELECT ... UNION ... renders bad SQL when column names are omitted and a plain SQL table is given

This commit is contained in:
lukaseder 2016-12-22 13:52:01 +01:00
parent 3b8502f710
commit bcc288a44d

View File

@ -1375,7 +1375,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
if (wrapQueryExpressionInDerivedTable)
context.formatIndentEnd()
.formatNewLine()
.sql(')');
.sql(") x");
if (context.data().containsKey(DATA_RENDER_TRAILING_LIMIT_IF_APPLICABLE) && actualLimit.isApplicable())
context.visit(actualLimit);