diff --git a/src/lib/connectors/postgres/index.ts b/src/lib/connectors/postgres/index.ts index db99c76..6be83bf 100644 --- a/src/lib/connectors/postgres/index.ts +++ b/src/lib/connectors/postgres/index.ts @@ -96,7 +96,7 @@ const getTableSchema = async (connection: Connection, databaseName: string): Pro connection.database = databaseName; const client = await newPostgresClient(connection); const { rows } = await client.query( - `SELECT table_schema, table_name FROM information_schema.tables WHERE table_schema NOT IN (${systemSchemas}) AND table_name NOT IN (${systemTables}) AND table_type='BASE TABLE' AND table_catalog=$1;`, + `SELECT table_schema, table_name FROM information_schema.tables WHERE table_schema NOT IN (${systemSchemas}) AND table_name NOT IN (${systemTables}) AND (table_type='BASE TABLE' or table_type='VIEW') AND table_catalog=$1;`, [databaseName] );