diff --git a/plugins/dbgate-plugin-postgres/src/backend/Analyser.js b/plugins/dbgate-plugin-postgres/src/backend/Analyser.js index 0f534bb5..b5904dd8 100644 --- a/plugins/dbgate-plugin-postgres/src/backend/Analyser.js +++ b/plugins/dbgate-plugin-postgres/src/backend/Analyser.js @@ -57,10 +57,11 @@ class Analyser extends DatabaseAnalyser { createQuery(resFileName, typeFields, replacements = {}) { const query = super.createQuery(sql[resFileName], typeFields, replacements); - const dbname = this.pool._database_name; - const schemaCondition = isCompositeDbName(dbname) - ? `= '${splitCompositeDbName(dbname).schema}' ` - : ' IS NOT NULL '; + // const dbname = this.pool._database_name; + // const schemaCondition = isCompositeDbName(dbname) + // ? `= '${splitCompositeDbName(dbname).schema}' ` + // : ' IS NOT NULL '; + const schemaCondition = ' IS NOT NULL '; return query?.replace(/=SCHEMA_NAME_CONDITION/g, schemaCondition); } diff --git a/plugins/dbgate-plugin-postgres/src/backend/drivers.js b/plugins/dbgate-plugin-postgres/src/backend/drivers.js index 1ec61d95..f6a3fdb3 100644 --- a/plugins/dbgate-plugin-postgres/src/backend/drivers.js +++ b/plugins/dbgate-plugin-postgres/src/backend/drivers.js @@ -90,7 +90,7 @@ const drivers = driverBases.map(driverBase => ({ await this.query(client, 'SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY'); } - client._database_name = database; + // client._database_name = database; return client; }, async close(pool) {