Skip to content

Commit

Permalink
fix(catalog): add mv indexes to pg_indexes (#17981)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang authored Aug 14, 2024
1 parent dec5023 commit 4b63d9f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ use risingwave_frontend_macro::system_catalog;
JOIN rw_catalog.rw_tables t ON i.primary_table_id = t.id
JOIN rw_catalog.rw_schemas s ON i.schema_id = s.id
UNION ALL
SELECT s.name AS schemaname,
t.name AS tablename,
i.name AS indexname,
NULL AS tablespace,
i.definition AS indexdef
FROM rw_catalog.rw_indexes i
JOIN rw_catalog.rw_materialized_views t ON i.primary_table_id = t.id
JOIN rw_catalog.rw_schemas s ON i.schema_id = s.id
UNION ALL
SELECT s.name AS schemaname,
t.name AS tablename,
concat(t.name, '_pkey') AS indexname,
Expand Down

0 comments on commit 4b63d9f

Please sign in to comment.