提交 41c979ef 编写于 作者: A Anastasiya Volkova

#10742 remove unused method

上级 e55dd2f0
......@@ -134,8 +134,4 @@ public class PostgreServerGreenplum extends PostgreServerExtensionBase {
return true;
}
@Override
public boolean needToTurnOffPreparedStatements() {
return true;
}
}
......@@ -208,7 +208,8 @@ public class PostgreDataSource extends JDBCDataSource implements DBSInstanceCont
} else {
getServerType().initDefaultSSLConfig(connectionInfo, props);
}
if (getServerType().needToTurnOffPreparedStatements()
PostgreServerType serverType = PostgreUtils.getServerType(getContainer().getDriver());
if (serverType != null && serverType.turnOffPreparedStatements()
&& !CommonUtils.toBoolean(getContainer().getActualConnectionConfiguration().getProviderProperty(PostgreConstants.PROP_USE_PREPARED_STATEMENTS))) {
// Turn off prepared statements using, to avoid error: "ERROR: prepared statement "S_1" already exists" from PGBouncer #10742
props.put("prepareThreshold", "0");
......
......@@ -143,7 +143,4 @@ public interface PostgreServerExtension
boolean supportsBackslashStringEscape();
boolean supportsTypeCategory();
boolean needToTurnOffPreparedStatements(); // PGBouncer Problems WorkAround
}
......@@ -469,8 +469,4 @@ public abstract class PostgreServerExtensionBase implements PostgreServerExtensi
return dataSource.isServerVersionAtLeast(8, 4);
}
@Override
public boolean needToTurnOffPreparedStatements() {
return false;
}
}
\ No newline at end of file
......@@ -61,9 +61,4 @@ public class PostgreServerPostgreSQL extends PostgreServerExtensionBase {
final PostgreSetting setting = dataSource.getSetting(PostgreConstants.OPTION_STANDARD_CONFORMING_STRINGS);
return setting != null && "off".equals(setting.getValue());
}
@Override
public boolean needToTurnOffPreparedStatements() {
return true;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册