From 0500e4032d288b996ddd94005eda9dddffa4656b Mon Sep 17 00:00:00 2001 From: Leo Q Date: Thu, 16 Jul 2020 15:32:33 +0800 Subject: [PATCH] use self.db_name when getting db list --- sql/engines/pgsql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/engines/pgsql.py b/sql/engines/pgsql.py index 74c58dbae7..64588226b0 100644 --- a/sql/engines/pgsql.py +++ b/sql/engines/pgsql.py @@ -43,7 +43,7 @@ def get_all_databases(self): 获取数据库列表 :return: """ - result = self.query(sql=f"SELECT datname FROM pg_database;") + result = self.query(sql=f"SELECT datname FROM pg_database;", db_name=self.db_name) db_list = [row[0] for row in result.rows if row[0] not in ['postgres', 'template0', 'template1']] result.rows = db_list return result