@@ -41,66 +41,91 @@ ROLLBACK;
41
41
create table test_partitioned (a int) partition by list (a);
42
42
-- these should all fail
43
43
select 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.
45
46
select 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.
47
49
select 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.
49
52
select 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.
51
55
select 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.
53
58
create table test_partition partition of test_partitioned for values in (1);
54
59
create index test_index on test_partition (a);
55
60
-- indexes do not, so these all fail
56
61
select 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.
58
64
select 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.
60
67
select 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.
62
70
select 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.
64
73
select 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.
66
76
create view test_view as select 1;
67
77
-- views do not have VMs, so these all fail
68
78
select 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.
70
81
select 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.
72
84
select 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.
74
87
select 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.
76
90
select 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.
78
93
create sequence test_sequence;
79
94
-- sequences do not have VMs, so these all fail
80
95
select 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.
82
98
select 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.
84
101
select 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.
86
104
select 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.
88
107
select 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.
90
110
create foreign data wrapper dummy;
91
111
create server dummy_server foreign data wrapper dummy;
92
112
create foreign table test_foreign_table () server dummy_server;
93
113
-- foreign tables do not have VMs, so these all fail
94
114
select 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.
96
117
select 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.
98
120
select 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.
100
123
select 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.
102
126
select 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.
104
129
-- check some of the allowed relkinds
105
130
create table regular_table (a int, b text);
106
131
alter table regular_table alter column b set storage external;
0 commit comments