提交 ef287ced 编写于 作者: S serge-rider

PG connection description readin

上级 ceb288d8
......@@ -255,8 +255,9 @@ public class PostgreDatabase extends JDBCRemoteInstance<PostgreDataSource>
if (description != null) {
return description;
}
// Query row count
try (JDBCSession session = DBUtils.openUtilSession(monitor, this, "Read database description")) {
try (JDBCSession session = DBUtils.openUtilSession(monitor, getDataSource(), "Read database description")) {
description = JDBCUtils.queryString(session, "select description from pg_shdescription "
+ "join pg_database on objoid = pg_database.oid where datname = ?", getName());
} catch (SQLException e) {
......@@ -316,7 +317,7 @@ public class PostgreDatabase extends JDBCRemoteInstance<PostgreDataSource>
if (!getDataSource().getServerType().supportsRoles()) {
return null;
}
checkInstanceConnection(monitor);
return PostgreUtils.getObjectById(monitor, roleCache, this, roleId);
}
......@@ -325,7 +326,7 @@ public class PostgreDatabase extends JDBCRemoteInstance<PostgreDataSource>
if (!getDataSource().getServerType().supportsRoles()) {
return null;
}
checkInstanceConnection(monitor);
return roleCache.getObject(monitor, owner, roleName);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册