提交 f787956d 编写于 作者: S Serge Rider

#3698 PostgreSQL: active database switch fixes

上级 0fa57108
......@@ -285,11 +285,13 @@ public class PostgreDataSource extends JDBCDataSource implements DBSObjectSelect
}
getDefaultInstance().cacheDataTypes(monitor);
/*
// Update database name and URL in connection settings and save datasources
DBPConnectionConfiguration conConfig = getContainer().getConnectionConfiguration();
conConfig.setDatabaseName(activeDatabaseName);
conConfig.setUrl(getContainer().getDriver().getDataSourceProvider().getConnectionURL(getContainer().getDriver(), conConfig));
getContainer().getRegistry().flushConfig();
*/
try (JDBCSession session = getDefaultContext(false).openSession(monitor, DBCExecutionPurpose.UTIL, "Update object state")) {
determineDefaultObjects(session);
......
......@@ -415,6 +415,6 @@ public class JDBCExecutionContext extends AbstractExecutionContext<JDBCDataSourc
public void reconnect(DBRProgressMonitor monitor) throws DBCException {
close();
connect(monitor, null, null, false, false);
connect(monitor, null, null, false, true);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册