Browse Source

[Bug][api] An error occurred while trying to access the Postgres database (#14574)

Signed-off-by: hoey94 <cnnqjban521@gmail.com>
3.2.1-prepare
hoey 1 year ago committed by GitHub
parent
commit
1ba0aecc71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java

3
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java

@ -666,8 +666,9 @@ public class DataSourceServiceImpl extends BaseServiceImpl implements DataSource
} }
if (dataSource.getType() == DbType.POSTGRESQL) { if (dataSource.getType() == DbType.POSTGRESQL) {
rs = connection.createStatement().executeQuery(Constants.DATABASES_QUERY_PG); rs = connection.createStatement().executeQuery(Constants.DATABASES_QUERY_PG);
} } else {
rs = connection.createStatement().executeQuery(Constants.DATABASES_QUERY); rs = connection.createStatement().executeQuery(Constants.DATABASES_QUERY);
}
tableList = new ArrayList<>(); tableList = new ArrayList<>();
while (rs.next()) { while (rs.next()) {
String name = rs.getString(1); String name = rs.getString(1);

Loading…
Cancel
Save