fix: PG SQL数据集,没有根据数据源侧配置的schema 进行正确的读取

This commit is contained in:
taojinlong 2023-09-05 16:20:21 +08:00
parent a0307fc869
commit 82cb6d6c63

View File

@ -13,10 +13,11 @@ public class PgConfiguration extends JdbcConfiguration {
private String extraParams = "";
public String getJdbc() {
if(StringUtils.isEmpty(extraParams.trim())){
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE"
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?currentSchema=SCHEMA"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().trim())
.replace("DATABASE", getDataBase().trim());
.replace("DATABASE", getDataBase().trim())
.replace("SCHEMA", getSchema().trim());
}else {
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
.replace("HOSTNAME", getHost().trim())