From 82cb6d6c63206b69bc4a384f34d83be96d1c9689 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 5 Sep 2023 16:20:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20PG=20SQL=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=A0=B9=E6=8D=AE=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E4=BE=A7=E9=85=8D=E7=BD=AE=E7=9A=84schema=20=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=AD=A3=E7=A1=AE=E7=9A=84=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/dto/datasource/PgConfiguration.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/backend/src/main/java/io/dataease/dto/datasource/PgConfiguration.java b/core/backend/src/main/java/io/dataease/dto/datasource/PgConfiguration.java index 1f1cd1b565..ca2471844e 100644 --- a/core/backend/src/main/java/io/dataease/dto/datasource/PgConfiguration.java +++ b/core/backend/src/main/java/io/dataease/dto/datasource/PgConfiguration.java @@ -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())