|
|
@@ -83,10 +83,14 @@ class PostgreSQLClient(BaseRDMSClient):
|
|
|
|
|
|
def get_databases(self):
|
|
|
# List all the schemas in the database
|
|
|
- cursor = self.connection.cursor()
|
|
|
- cursor.execute('SELECT schema_name FROM information_schema.schemata')
|
|
|
- self.connection.commit()
|
|
|
- return [row[0] for row in cursor.fetchall()]
|
|
|
+ try:
|
|
|
+ cursor = self.connection.cursor()
|
|
|
+ cursor.execute('SELECT schema_name FROM information_schema.schemata')
|
|
|
+ self.connection.commit()
|
|
|
+ return [row[0] for row in cursor.fetchall()]
|
|
|
+ except Exception:
|
|
|
+ LOG.exception('Failed to select schema_name from information_schema')
|
|
|
+ return [self._conn_params['database']]
|
|
|
|
|
|
|
|
|
def get_tables(self, database, table_names=[]):
|