Skip to content

Commit

Permalink
ui: disallow VIEW type tables from being shown in the db pages
Browse files Browse the repository at this point in the history
Previously we filtered out `SYSTEM VIEW` tables from being shown
in the db pages but not user created views. We now filter out
all VIEW type tables from the db pages.

Epic: none
Fixes: #119789

Release note (bug fix): Users will no longer see VIEW type tables
from being shown in the db-console databases pages. Previously
these would be listed with no info, only displaying errors.
  • Loading branch information
xinhaoz committed Mar 4, 2024
1 parent b6b08d7 commit 34b980c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts
Expand Up @@ -175,7 +175,7 @@ const getDatabaseTablesQuery: DatabaseDetailsQuery<DatabaseTablesRow> = {
sql: Format(
`SELECT table_schema, table_name
FROM %1.information_schema.tables
WHERE table_type != 'SYSTEM VIEW'
WHERE table_type NOT IN ('SYSTEM VIEW', 'VIEW')
ORDER BY table_name`,
[new Identifier(dbName)],
),
Expand Down Expand Up @@ -215,7 +215,7 @@ const getDatabaseTablesQuery: DatabaseDetailsQuery<DatabaseTablesRow> = {
sql: Format(
`SELECT table_schema, table_name
FROM %1.information_schema.tables
WHERE table_type != 'SYSTEM VIEW'
WHERE table_type NOT IN ('SYSTEM VIEW', 'VIEW')
ORDER BY table_name offset %2`,
[new Identifier(dbName), dbDetail.tablesResp.tables.length],
),
Expand Down

0 comments on commit 34b980c

Please sign in to comment.