[#3727] Don't apply this fix to databases other than PostgreSQL

This commit is contained in:
Lukas Eder 2015-02-25 18:18:08 +01:00
parent 38d155a0fd
commit 3bd5d16ad0

View File

@ -370,7 +370,10 @@ class Function<T> extends AbstractField<T> implements
// [#3727] Referenced WindowDefinitions that contain a frame clause
// shouldn't be referenced from within parentheses (in PostgreSQL)
if (windowDefinition != null)
return windowDefinition;
if (POSTGRES == ctx.family())
return windowDefinition;
else
return DSL.sql("{0}", windowDefinition);
// [#531] Inline window specifications if the WINDOW clause is not supported
if (windowName != null) {
@ -384,7 +387,7 @@ class Function<T> extends AbstractField<T> implements
if (windows != null) {
for (WindowDefinition window : windows) {
if (((WindowDefinitionImpl) window).getName().equals(windowName)) {
return window;
return DSL.sql("({0})", window);
}
}
}