[jOOQ/jOOQ#11732] PostgreSQL ON CONFLICT .. WHERE <index_predicate>

generates not valid SQL
This commit is contained in:
Lukas Eder 2021-04-09 16:31:49 +02:00
parent d32765ee28
commit b09d562f15

View File

@ -352,10 +352,11 @@ final class InsertQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
}
if (onConflictWhere.hasWhere())
ctx.formatSeparator()
.visit(K_WHERE)
.sql(' ')
.visit(onConflictWhere.getWhere());
ctx.qualify(false, c -> c
.formatSeparator()
.visit(K_WHERE)
.sql(' ')
.visit(onConflictWhere.getWhere()));
ctx.formatSeparator()
.visit(K_DO_UPDATE)