From 60d5438879ce56e4ffa10025126eded1886cb635 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Tue, 8 Oct 2024 18:29:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20pgsql=20=E5=B8=A6?= =?UTF-8?q?=E6=9C=89=E4=B8=AD=E5=88=92=E7=BA=BF=E7=9A=84=20schame=20?= =?UTF-8?q?=E5=92=8C=20table=20=E6=97=A0=E6=B3=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../postgresql/PostgresqlActuator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/modules/src/main/java/org.jumpserver.chen.modules/postgresql/PostgresqlActuator.java b/backend/modules/src/main/java/org.jumpserver.chen.modules/postgresql/PostgresqlActuator.java index bcdb659..663041d 100644 --- a/backend/modules/src/main/java/org.jumpserver.chen.modules/postgresql/PostgresqlActuator.java +++ b/backend/modules/src/main/java/org.jumpserver.chen.modules/postgresql/PostgresqlActuator.java @@ -33,12 +33,12 @@ public List getSchemas() throws SQLException { @Override public void changeSchema(String schema) throws SQLException { - this.execute(SQL.of("SET SEARCH_PATH TO ?;", schema)); + this.execute(SQL.of("SET SEARCH_PATH TO '?';", schema)); } @Override public SQLExecutePlan createPlan(String schema, String table, SQLQueryParams sqlQueryParams) throws SQLException { - var sql = SQL.of("select * from ?.?", schema, table); + var sql = SQL.of("select * from \"?\".\"?\"", schema, table); return this.createPlan(sql, sqlQueryParams); } }