Skip to content

Commit

Permalink
Merge pull request #45 from jumpserver/pr@dev@fix_pg_table_name_format
Browse files Browse the repository at this point in the history
fix: 修复 pgsql 带有中划线的 schame 和 table 无法查询的问题
  • Loading branch information
Aaron3S authored Oct 9, 2024
2 parents a31f0ab + 60d5438 commit 8952db7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public List<String> 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);
}
}

0 comments on commit 8952db7

Please sign in to comment.