@@ -41,66 +41,91 @@ ROLLBACK;
4141create table test_partitioned (a int) partition by list (a);
4242-- these should all fail
4343select pg_visibility('test_partitioned', 0);
44- ERROR: "test_partitioned" is not a table, materialized view, or TOAST table
44+ ERROR: relation "test_partitioned" is of wrong relation kind
45+ DETAIL: This operation is not supported for partitioned tables.
4546select pg_visibility_map('test_partitioned');
46- ERROR: "test_partitioned" is not a table, materialized view, or TOAST table
47+ ERROR: relation "test_partitioned" is of wrong relation kind
48+ DETAIL: This operation is not supported for partitioned tables.
4749select pg_visibility_map_summary('test_partitioned');
48- ERROR: "test_partitioned" is not a table, materialized view, or TOAST table
50+ ERROR: relation "test_partitioned" is of wrong relation kind
51+ DETAIL: This operation is not supported for partitioned tables.
4952select pg_check_frozen('test_partitioned');
50- ERROR: "test_partitioned" is not a table, materialized view, or TOAST table
53+ ERROR: relation "test_partitioned" is of wrong relation kind
54+ DETAIL: This operation is not supported for partitioned tables.
5155select pg_truncate_visibility_map('test_partitioned');
52- ERROR: "test_partitioned" is not a table, materialized view, or TOAST table
56+ ERROR: relation "test_partitioned" is of wrong relation kind
57+ DETAIL: This operation is not supported for partitioned tables.
5358create table test_partition partition of test_partitioned for values in (1);
5459create index test_index on test_partition (a);
5560-- indexes do not, so these all fail
5661select pg_visibility('test_index', 0);
57- ERROR: "test_index" is not a table, materialized view, or TOAST table
62+ ERROR: relation "test_index" is of wrong relation kind
63+ DETAIL: This operation is not supported for indexes.
5864select pg_visibility_map('test_index');
59- ERROR: "test_index" is not a table, materialized view, or TOAST table
65+ ERROR: relation "test_index" is of wrong relation kind
66+ DETAIL: This operation is not supported for indexes.
6067select pg_visibility_map_summary('test_index');
61- ERROR: "test_index" is not a table, materialized view, or TOAST table
68+ ERROR: relation "test_index" is of wrong relation kind
69+ DETAIL: This operation is not supported for indexes.
6270select pg_check_frozen('test_index');
63- ERROR: "test_index" is not a table, materialized view, or TOAST table
71+ ERROR: relation "test_index" is of wrong relation kind
72+ DETAIL: This operation is not supported for indexes.
6473select pg_truncate_visibility_map('test_index');
65- ERROR: "test_index" is not a table, materialized view, or TOAST table
74+ ERROR: relation "test_index" is of wrong relation kind
75+ DETAIL: This operation is not supported for indexes.
6676create view test_view as select 1;
6777-- views do not have VMs, so these all fail
6878select pg_visibility('test_view', 0);
69- ERROR: "test_view" is not a table, materialized view, or TOAST table
79+ ERROR: relation "test_view" is of wrong relation kind
80+ DETAIL: This operation is not supported for views.
7081select pg_visibility_map('test_view');
71- ERROR: "test_view" is not a table, materialized view, or TOAST table
82+ ERROR: relation "test_view" is of wrong relation kind
83+ DETAIL: This operation is not supported for views.
7284select pg_visibility_map_summary('test_view');
73- ERROR: "test_view" is not a table, materialized view, or TOAST table
85+ ERROR: relation "test_view" is of wrong relation kind
86+ DETAIL: This operation is not supported for views.
7487select pg_check_frozen('test_view');
75- ERROR: "test_view" is not a table, materialized view, or TOAST table
88+ ERROR: relation "test_view" is of wrong relation kind
89+ DETAIL: This operation is not supported for views.
7690select pg_truncate_visibility_map('test_view');
77- ERROR: "test_view" is not a table, materialized view, or TOAST table
91+ ERROR: relation "test_view" is of wrong relation kind
92+ DETAIL: This operation is not supported for views.
7893create sequence test_sequence;
7994-- sequences do not have VMs, so these all fail
8095select pg_visibility('test_sequence', 0);
81- ERROR: "test_sequence" is not a table, materialized view, or TOAST table
96+ ERROR: relation "test_sequence" is of wrong relation kind
97+ DETAIL: This operation is not supported for sequences.
8298select pg_visibility_map('test_sequence');
83- ERROR: "test_sequence" is not a table, materialized view, or TOAST table
99+ ERROR: relation "test_sequence" is of wrong relation kind
100+ DETAIL: This operation is not supported for sequences.
84101select pg_visibility_map_summary('test_sequence');
85- ERROR: "test_sequence" is not a table, materialized view, or TOAST table
102+ ERROR: relation "test_sequence" is of wrong relation kind
103+ DETAIL: This operation is not supported for sequences.
86104select pg_check_frozen('test_sequence');
87- ERROR: "test_sequence" is not a table, materialized view, or TOAST table
105+ ERROR: relation "test_sequence" is of wrong relation kind
106+ DETAIL: This operation is not supported for sequences.
88107select pg_truncate_visibility_map('test_sequence');
89- ERROR: "test_sequence" is not a table, materialized view, or TOAST table
108+ ERROR: relation "test_sequence" is of wrong relation kind
109+ DETAIL: This operation is not supported for sequences.
90110create foreign data wrapper dummy;
91111create server dummy_server foreign data wrapper dummy;
92112create foreign table test_foreign_table () server dummy_server;
93113-- foreign tables do not have VMs, so these all fail
94114select pg_visibility('test_foreign_table', 0);
95- ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table
115+ ERROR: relation "test_foreign_table" is of wrong relation kind
116+ DETAIL: This operation is not supported for foreign tables.
96117select pg_visibility_map('test_foreign_table');
97- ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table
118+ ERROR: relation "test_foreign_table" is of wrong relation kind
119+ DETAIL: This operation is not supported for foreign tables.
98120select pg_visibility_map_summary('test_foreign_table');
99- ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table
121+ ERROR: relation "test_foreign_table" is of wrong relation kind
122+ DETAIL: This operation is not supported for foreign tables.
100123select pg_check_frozen('test_foreign_table');
101- ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table
124+ ERROR: relation "test_foreign_table" is of wrong relation kind
125+ DETAIL: This operation is not supported for foreign tables.
102126select pg_truncate_visibility_map('test_foreign_table');
103- ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table
127+ ERROR: relation "test_foreign_table" is of wrong relation kind
128+ DETAIL: This operation is not supported for foreign tables.
104129-- check some of the allowed relkinds
105130create table regular_table (a int, b text);
106131alter table regular_table alter column b set storage external;
0 commit comments