forked from github/dataease
Merge pull request #6023 from dataease/pr@dev@pgsql
fix: PG SQL数据集,没有根据数据源侧配置的schema 进行正确的读取
This commit is contained in:
commit
c9caed7ac2
@ -13,10 +13,11 @@ public class PgConfiguration extends JdbcConfiguration {
|
|||||||
private String extraParams = "";
|
private String extraParams = "";
|
||||||
public String getJdbc() {
|
public String getJdbc() {
|
||||||
if(StringUtils.isEmpty(extraParams.trim())){
|
if(StringUtils.isEmpty(extraParams.trim())){
|
||||||
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE"
|
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?currentSchema=SCHEMA"
|
||||||
.replace("HOSTNAME", getHost().trim())
|
.replace("HOSTNAME", getHost().trim())
|
||||||
.replace("PORT", getPort().toString().trim())
|
.replace("PORT", getPort().toString().trim())
|
||||||
.replace("DATABASE", getDataBase().trim());
|
.replace("DATABASE", getDataBase().trim())
|
||||||
|
.replace("SCHEMA", getSchema().trim());
|
||||||
}else {
|
}else {
|
||||||
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
|
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
|
||||||
.replace("HOSTNAME", getHost().trim())
|
.replace("HOSTNAME", getHost().trim())
|
||||||
|
Loading…
Reference in New Issue
Block a user