Skip to content

Commit

Permalink
feat(meta): add internal table to pg_class (risingwavelabs#8594)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 authored Mar 16, 2023
1 parent 632423a commit bcb324b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/frontend/src/catalog/system_catalog/pg_catalog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,28 @@ impl SysCatalogReaderImpl {
})
.collect_vec();

let internal_tables = schema
.iter_internal_table()
.map(|table| {
OwnedRow::new(vec![
Some(ScalarImpl::Int32(table.id.table_id() as i32)),
Some(ScalarImpl::Utf8(table.name.clone().into())),
Some(ScalarImpl::Int32(schema_info.id as i32)),
Some(ScalarImpl::Int32(table.owner as i32)),
Some(ScalarImpl::Utf8("n".into())),
Some(ScalarImpl::Int32(0)),
Some(ScalarImpl::Int32(0)),
])
})
.collect_vec();

rows.into_iter()
.chain(mvs.into_iter())
.chain(indexes.into_iter())
.chain(sources.into_iter())
.chain(sys_tables.into_iter())
.chain(views.into_iter())
.chain(internal_tables.into_iter())
.collect_vec()
})
.collect_vec())
Expand Down

0 comments on commit bcb324b

Please sign in to comment.