in wrapper/src/main/java/software/amazon/jdbc/dialect/RdsPgDialect.java [47:84]
public boolean isDialect(final Connection connection) {
if (!super.isDialect(connection)) {
return false;
}
Statement stmt = null;
ResultSet rs = null;
try {
stmt = connection.createStatement();
rs = stmt.executeQuery(extensionsSql);
while (rs.next()) {
final boolean rdsTools = rs.getBoolean("rds_tools");
final boolean auroraUtils = rs.getBoolean("aurora_stat_utils");
LOGGER.finest(() -> String.format("rdsTools: %b, auroraUtils: %b", rdsTools, auroraUtils));
if (rdsTools && !auroraUtils) {
return true;
}
}
} catch (final SQLException ex) {
// ignore
} finally {
if (stmt != null) {
try {
stmt.close();
} catch (SQLException ex) {
// ignore
}
}
if (rs != null) {
try {
rs.close();
} catch (SQLException ex) {
// ignore
}
}
}
return false;
}