Skip to content

Commit

Permalink
fix: replace current_database() = '..' clauses (#2788)
Browse files Browse the repository at this point in the history
Replace `current_database() = '...' clauses in JDBC system queries.
This is generated by (among others) Liquibase.

Fixes the build error in #2752
  • Loading branch information
olavloite authored Jan 20, 2025
1 parent c437ccd commit ef99d80
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ private static String replaceGetTablesQuery(String sql, String replacedSql) {
}
replacedSql += " WHERE TRUE " + sql.substring(startIndex);
return replacedSql
.replaceFirst(" AND current_database\\(\\) = '.*?'", "")
.replace(" AND n.nspname LIKE ", " AND TABLE_SCHEMA LIKE ")
.replace(" AND c.relname LIKE ", " AND TABLE_NAME LIKE ")
.replace(
Expand Down

0 comments on commit ef99d80

Please sign in to comment.