don't see materialized views in information_schema
От | Pavel Stehule |
---|---|
Тема | don't see materialized views in information_schema |
Дата | |
Msg-id | CAFj8pRAkrGFm5BEAj_xK9pYLZ6YSF39shUTp9z8DcX7rqQNNCw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: don't see materialized views in information_schema
|
Список | pgsql-hackers |
Hi
create table omega(a int);
create view omega_view as select * from omega;
insert into omega values(10);
postgres=# select table_type, table_name from information_schema.tables where table_name like 'omega%';
┌────────────┬────────────┐
│ table_type │ table_name │
╞════════════╪════════════╡
│ BASE TABLE │ omega │
│ VIEW │ omega_view │
└────────────┴────────────┘
(2 rows)
┌────────────┬────────────┐
│ table_type │ table_name │
╞════════════╪════════════╡
│ BASE TABLE │ omega │
│ VIEW │ omega_view │
└────────────┴────────────┘
(2 rows)
postgres=# create materialized view omega_m_view as select * from omega;
SELECT 1
postgres=# select table_type, table_name from information_schema.tables where table_name like 'omega%';
┌────────────┬────────────┐
│ table_type │ table_name │
╞════════════╪════════════╡
│ BASE TABLE │ omega │
│ VIEW │ omega_view │
└────────────┴────────────┘
(2 rows)
postgres=# refresh materialized view omega_m_view ;
REFRESH MATERIALIZED VIEW
postgres=# select table_type, table_name from information_schema.tables where table_name like 'omega%';
┌────────────┬────────────┐
│ table_type │ table_name │
╞════════════╪════════════╡
│ BASE TABLE │ omega │
│ VIEW │ omega_view │
└────────────┴────────────┘
(2 rows)
SELECT 1
postgres=# select table_type, table_name from information_schema.tables where table_name like 'omega%';
┌────────────┬────────────┐
│ table_type │ table_name │
╞════════════╪════════════╡
│ BASE TABLE │ omega │
│ VIEW │ omega_view │
└────────────┴────────────┘
(2 rows)
postgres=# refresh materialized view omega_m_view ;
REFRESH MATERIALIZED VIEW
postgres=# select table_type, table_name from information_schema.tables where table_name like 'omega%';
┌────────────┬────────────┐
│ table_type │ table_name │
╞════════════╪════════════╡
│ BASE TABLE │ omega │
│ VIEW │ omega_view │
└────────────┴────────────┘
(2 rows)
Is it expected behave? Tested on master branch.
Pavel
В списке pgsql-hackers по дате отправления: