describe_am.patch
application/octet-stream
Filename: describe_am.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/bin/psql/describe.c | 14 | 1 |
| src/test/regress/expected/copy2.out | 1 | 0 |
| src/test/regress/expected/create_table_like.out | 6 | 0 |
| src/test/regress/expected/create_table.out | 12 | 0 |
| src/test/regress/expected/domain.out | 2 | 0 |
| src/test/regress/expected/foreign_data.out | 42 | 0 |
| src/test/regress/expected/inherit.out | 13 | 0 |
| src/test/regress/expected/insert.out | 12 | 0 |
| src/test/regress/expected/matview.out | 8 | 0 |
| src/test/regress/expected/publication.out | 4 | 0 |
| src/test/regress/expected/replica_identity.out | 1 | 0 |
| src/test/regress/expected/rowsecurity.out | 1 | 0 |
| src/test/regress/expected/rules.out | 2 | 0 |
| src/test/regress/expected/update.out | 1 | 0 |
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 0a181b01d9..a292c531b5 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1484,6 +1484,7 @@ describeOneTableDetails(const char *schemaname,
char *reloftype;
char relpersistence;
char relreplident;
+ char *relam;
} tableinfo;
bool show_column_details = false;
@@ -1503,9 +1504,10 @@ describeOneTableDetails(const char *schemaname,
"c.relhastriggers, c.relrowsecurity, c.relforcerowsecurity, "
"false AS relhasoids, %s, c.reltablespace, "
"CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalog.text END, "
- "c.relpersistence, c.relreplident\n"
+ "c.relpersistence, c.relreplident, am.amname\n"
"FROM pg_catalog.pg_class c\n "
"LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n"
+ "LEFT JOIN pg_catalog.pg_am am ON (c.relam = am.oid)\n"
"WHERE c.oid = '%s';",
(verbose ?
"pg_catalog.array_to_string(c.reloptions || "
@@ -1656,6 +1658,8 @@ describeOneTableDetails(const char *schemaname,
*(PQgetvalue(res, 0, 11)) : 0;
tableinfo.relreplident = (pset.sversion >= 90400) ?
*(PQgetvalue(res, 0, 12)) : 'd';
+ tableinfo.relam = (pset.sversion >= 120000) ?
+ pg_strdup(PQgetvalue(res, 0, 13)) : NULL;
PQclear(res);
res = NULL;
@@ -3141,6 +3145,15 @@ describeOneTableDetails(const char *schemaname,
/* Tablespace info */
add_tablespace_footer(&cont, tableinfo.relkind, tableinfo.tablespace,
true);
+
+ /* Access method info */
+ if (pset.sversion >= 120000 && verbose)
+ {
+ printfPQExpBuffer(&buf, _("Access method: %s"), tableinfo.relam);
+ printTableAddFooter(&cont, buf.data);
+ }
+
+
}
/* reloptions, if verbose */
diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out
index 19bb538411..84d182303e 100644
--- a/src/test/regress/expected/copy2.out
+++ b/src/test/regress/expected/copy2.out
@@ -432,6 +432,7 @@ alter table check_con_tbl add check (check_con_function(check_con_tbl.*));
f1 | integer | | | | plain | |
Check constraints:
"check_con_tbl_check" CHECK (check_con_function(check_con_tbl.*))
+Access method: heap
copy check_con_tbl from stdin;
NOTICE: input = {"f1":1}
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out
index 7e52c27e3f..dbaa713e6b 100644
--- a/src/test/regress/expected/create_table.out
+++ b/src/test/regress/expected/create_table.out
@@ -438,6 +438,7 @@ Number of partitions: 0
b | text | | | | extended | |
Partition key: RANGE (((a + 1)), substr(b, 1, 5))
Number of partitions: 0
+Access method: heap
INSERT INTO partitioned2 VALUES (1, 'hello');
ERROR: no partition of relation "partitioned2" found for row
@@ -451,6 +452,7 @@ CREATE TABLE part2_1 PARTITION OF partitioned2 FOR VALUES FROM (-1, 'aaaaa') TO
b | text | | | | extended | |
Partition of: partitioned2 FOR VALUES FROM ('-1', 'aaaaa') TO (100, 'ccccc')
Partition constraint: (((a + 1) IS NOT NULL) AND (substr(b, 1, 5) IS NOT NULL) AND (((a + 1) > '-1'::integer) OR (((a + 1) = '-1'::integer) AND (substr(b, 1, 5) >= 'aaaaa'::text))) AND (((a + 1) < 100) OR (((a + 1) = 100) AND (substr(b, 1, 5) < 'ccccc'::text))))
+Access method: heap
DROP TABLE partitioned, partitioned2;
--
@@ -783,6 +785,7 @@ drop table parted_collate_must_match;
b | integer | | not null | 1 | plain | |
Partition of: parted FOR VALUES IN ('b')
Partition constraint: ((a IS NOT NULL) AND (a = 'b'::text))
+Access method: heap
-- Both partition bound and partition key in describe output
\d+ part_c
@@ -795,6 +798,7 @@ Partition of: parted FOR VALUES IN ('c')
Partition constraint: ((a IS NOT NULL) AND (a = 'c'::text))
Partition key: RANGE (b)
Partitions: part_c_1_10 FOR VALUES FROM (1) TO (10)
+Access method: heap
-- a level-2 partition's constraint will include the parent's expressions
\d+ part_c_1_10
@@ -805,6 +809,7 @@ Partitions: part_c_1_10 FOR VALUES FROM (1) TO (10)
b | integer | | not null | 0 | plain | |
Partition of: part_c FOR VALUES FROM (1) TO (10)
Partition constraint: ((a IS NOT NULL) AND (a = 'c'::text) AND (b IS NOT NULL) AND (b >= 1) AND (b < 10))
+Access method: heap
-- Show partition count in the parent's describe output
-- Tempted to include \d+ output listing partitions with bound info but
@@ -839,6 +844,7 @@ CREATE TABLE unbounded_range_part PARTITION OF range_parted4 FOR VALUES FROM (MI
c | integer | | | | plain | |
Partition of: range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (MAXVALUE, MAXVALUE, MAXVALUE)
Partition constraint: ((abs(a) IS NOT NULL) AND (abs(b) IS NOT NULL) AND (c IS NOT NULL))
+Access method: heap
DROP TABLE unbounded_range_part;
CREATE TABLE range_parted4_1 PARTITION OF range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (1, MAXVALUE, MAXVALUE);
@@ -851,6 +857,7 @@ CREATE TABLE range_parted4_1 PARTITION OF range_parted4 FOR VALUES FROM (MINVALU
c | integer | | | | plain | |
Partition of: range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (1, MAXVALUE, MAXVALUE)
Partition constraint: ((abs(a) IS NOT NULL) AND (abs(b) IS NOT NULL) AND (c IS NOT NULL) AND (abs(a) <= 1))
+Access method: heap
CREATE TABLE range_parted4_2 PARTITION OF range_parted4 FOR VALUES FROM (3, 4, 5) TO (6, 7, MAXVALUE);
\d+ range_parted4_2
@@ -862,6 +869,7 @@ CREATE TABLE range_parted4_2 PARTITION OF range_parted4 FOR VALUES FROM (3, 4, 5
c | integer | | | | plain | |
Partition of: range_parted4 FOR VALUES FROM (3, 4, 5) TO (6, 7, MAXVALUE)
Partition constraint: ((abs(a) IS NOT NULL) AND (abs(b) IS NOT NULL) AND (c IS NOT NULL) AND ((abs(a) > 3) OR ((abs(a) = 3) AND (abs(b) > 4)) OR ((abs(a) = 3) AND (abs(b) = 4) AND (c >= 5))) AND ((abs(a) < 6) OR ((abs(a) = 6) AND (abs(b) <= 7))))
+Access method: heap
CREATE TABLE range_parted4_3 PARTITION OF range_parted4 FOR VALUES FROM (6, 8, MINVALUE) TO (9, MAXVALUE, MAXVALUE);
\d+ range_parted4_3
@@ -873,6 +881,7 @@ CREATE TABLE range_parted4_3 PARTITION OF range_parted4 FOR VALUES FROM (6, 8, M
c | integer | | | | plain | |
Partition of: range_parted4 FOR VALUES FROM (6, 8, MINVALUE) TO (9, MAXVALUE, MAXVALUE)
Partition constraint: ((abs(a) IS NOT NULL) AND (abs(b) IS NOT NULL) AND (c IS NOT NULL) AND ((abs(a) > 6) OR ((abs(a) = 6) AND (abs(b) >= 8))) AND (abs(a) <= 9))
+Access method: heap
DROP TABLE range_parted4;
-- user-defined operator class in partition key
@@ -909,6 +918,7 @@ SELECT obj_description('parted_col_comment'::regclass);
b | text | | | | extended | |
Partition key: LIST (a)
Number of partitions: 0
+Access method: heap
DROP TABLE parted_col_comment;
-- list partitioning on array type column
@@ -921,6 +931,7 @@ CREATE TABLE arrlp12 PARTITION OF arrlp FOR VALUES IN ('{1}', '{2}');
a | integer[] | | | | extended | |
Partition of: arrlp FOR VALUES IN ('{1}', '{2}')
Partition constraint: ((a IS NOT NULL) AND ((a = '{1}'::integer[]) OR (a = '{2}'::integer[])))
+Access method: heap
DROP TABLE arrlp;
-- partition on boolean column
@@ -935,6 +946,7 @@ create table boolspart_f partition of boolspart for values in (false);
Partition key: LIST (a)
Partitions: boolspart_f FOR VALUES IN (false),
boolspart_t FOR VALUES IN (true)
+Access method: heap
drop table boolspart;
-- partitions mixing temporary and permanent relations
diff --git a/src/test/regress/expected/create_table_like.out b/src/test/regress/expected/create_table_like.out
index b582211270..951d876216 100644
--- a/src/test/regress/expected/create_table_like.out
+++ b/src/test/regress/expected/create_table_like.out
@@ -164,6 +164,7 @@ CREATE TABLE ctlt12_storage (LIKE ctlt1 INCLUDING STORAGE, LIKE ctlt2 INCLUDING
a | text | | not null | | main | |
b | text | | | | extended | |
c | text | | | | external | |
+Access method: heap
CREATE TABLE ctlt12_comments (LIKE ctlt1 INCLUDING COMMENTS, LIKE ctlt2 INCLUDING COMMENTS);
\d+ ctlt12_comments
@@ -173,6 +174,7 @@ CREATE TABLE ctlt12_comments (LIKE ctlt1 INCLUDING COMMENTS, LIKE ctlt2 INCLUDIN
a | text | | not null | | extended | | A
b | text | | | | extended | | B
c | text | | | | extended | | C
+Access method: heap
CREATE TABLE ctlt1_inh (LIKE ctlt1 INCLUDING CONSTRAINTS INCLUDING COMMENTS) INHERITS (ctlt1);
NOTICE: merging column "a" with inherited definition
@@ -187,6 +189,7 @@ NOTICE: merging constraint "ctlt1_a_check" with inherited definition
Check constraints:
"ctlt1_a_check" CHECK (length(a) > 2)
Inherits: ctlt1
+Access method: heap
SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt1_inh'::regclass;
description
@@ -208,6 +211,7 @@ Check constraints:
"ctlt3_a_check" CHECK (length(a) < 5)
Inherits: ctlt1,
ctlt3
+Access method: heap
CREATE TABLE ctlt13_like (LIKE ctlt3 INCLUDING CONSTRAINTS INCLUDING COMMENTS INCLUDING STORAGE) INHERITS (ctlt1);
NOTICE: merging column "a" with inherited definition
@@ -222,6 +226,7 @@ Check constraints:
"ctlt1_a_check" CHECK (length(a) > 2)
"ctlt3_a_check" CHECK (length(a) < 5)
Inherits: ctlt1
+Access method: heap
SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt13_like'::regclass;
description
@@ -244,6 +249,7 @@ Check constraints:
"ctlt1_a_check" CHECK (length(a) > 2)
Statistics objects:
"public"."ctlt_all_a_b_stat" (ndistinct, dependencies) ON a, b FROM ctlt_all
+Access method: heap
SELECT c.relname, objsubid, description FROM pg_description, pg_index i, pg_class c WHERE classoid = 'pg_class'::regclass AND objoid = i.indexrelid AND c.oid = i.indexrelid AND i.indrelid = 'ctlt_all'::regclass ORDER BY c.relname, objsubid;
relname | objsubid | description
diff --git a/src/test/regress/expected/domain.out b/src/test/regress/expected/domain.out
index 0b5a9041b0..976fd7446f 100644
--- a/src/test/regress/expected/domain.out
+++ b/src/test/regress/expected/domain.out
@@ -282,6 +282,7 @@ Rules:
silly AS
ON DELETE TO dcomptable DO INSTEAD UPDATE dcomptable SET d1.r = (dcomptable.d1).r - 1::double precision, d1.i = (dcomptable.d1).i + 1::double precision
WHERE (dcomptable.d1).i > 0::double precision
+Access method: heap
drop table dcomptable;
drop type comptype cascade;
@@ -419,6 +420,7 @@ Rules:
silly AS
ON DELETE TO dcomptable DO INSTEAD UPDATE dcomptable SET d1[1].r = dcomptable.d1[1].r - 1::double precision, d1[1].i = dcomptable.d1[1].i + 1::double precision
WHERE dcomptable.d1[1].i > 0::double precision
+Access method: heap
drop table dcomptable;
drop type comptype cascade;
diff --git a/src/test/regress/expected/foreign_data.out b/src/test/regress/expected/foreign_data.out
index 4d82d3a7e8..94ab874d75 100644
--- a/src/test/regress/expected/foreign_data.out
+++ b/src/test/regress/expected/foreign_data.out
@@ -731,6 +731,7 @@ Check constraints:
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date)
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
\det+
List of foreign tables
@@ -800,6 +801,7 @@ Check constraints:
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date)
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
-- can't change the column type if it's used elsewhere
CREATE TABLE use_ft1_column_type (x ft1);
@@ -1339,6 +1341,7 @@ CREATE FOREIGN TABLE ft2 () INHERITS (fd_pt1)
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1350,6 +1353,7 @@ Child tables: ft2
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
+Access method:
DROP FOREIGN TABLE ft2;
\d+ fd_pt1
@@ -1359,6 +1363,7 @@ DROP FOREIGN TABLE ft2;
c1 | integer | | not null | | plain | |
c2 | text | | | | extended | |
c3 | date | | | | plain | |
+Access method: heap
CREATE FOREIGN TABLE ft2 (
c1 integer NOT NULL,
@@ -1374,6 +1379,7 @@ CREATE FOREIGN TABLE ft2 (
c3 | date | | | | | plain | |
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
\d+ fd_pt1
@@ -1384,6 +1390,7 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1395,6 +1402,7 @@ Child tables: ft2
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
+Access method:
CREATE TABLE ct3() INHERITS(ft2);
CREATE FOREIGN TABLE ft3 (
@@ -1418,6 +1426,7 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
ft3
+Access method:
\d+ ct3
Table "public.ct3"
@@ -1427,6 +1436,7 @@ Child tables: ct3,
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Inherits: ft2
+Access method: heap
\d+ ft3
Foreign table "public.ft3"
@@ -1437,6 +1447,7 @@ Inherits: ft2
c3 | date | | | | | plain | |
Server: s0
Inherits: ft2
+Access method:
-- add attributes recursively
ALTER TABLE fd_pt1 ADD COLUMN c4 integer;
@@ -1457,6 +1468,7 @@ ALTER TABLE fd_pt1 ADD COLUMN c8 integer;
c7 | integer | | not null | | plain | |
c8 | integer | | | | plain | |
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1475,6 +1487,7 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
ft3
+Access method:
\d+ ct3
Table "public.ct3"
@@ -1489,6 +1502,7 @@ Child tables: ct3,
c7 | integer | | not null | | plain | |
c8 | integer | | | | plain | |
Inherits: ft2
+Access method: heap
\d+ ft3
Foreign table "public.ft3"
@@ -1504,6 +1518,7 @@ Inherits: ft2
c8 | integer | | | | | plain | |
Server: s0
Inherits: ft2
+Access method:
-- alter attributes recursively
ALTER TABLE fd_pt1 ALTER COLUMN c4 SET DEFAULT 0;
@@ -1531,6 +1546,7 @@ ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
c7 | integer | | | | plain | |
c8 | text | | | | external | |
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1549,6 +1565,7 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
ft3
+Access method:
-- drop attributes recursively
ALTER TABLE fd_pt1 DROP COLUMN c4;
@@ -1564,6 +1581,7 @@ ALTER TABLE fd_pt1 DROP COLUMN c8;
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1577,6 +1595,7 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
ft3
+Access method:
-- add constraints recursively
ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT;
@@ -1604,6 +1623,7 @@ Check constraints:
"fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
"fd_pt1chk2" CHECK (c2 <> ''::text)
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1619,6 +1639,7 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
ft3
+Access method:
\set VERBOSITY terse
DROP FOREIGN TABLE ft2; -- ERROR
@@ -1648,6 +1669,7 @@ Check constraints:
"fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
"fd_pt1chk2" CHECK (c2 <> ''::text)
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1661,6 +1683,7 @@ Check constraints:
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
+Access method:
-- drop constraints recursively
ALTER TABLE fd_pt1 DROP CONSTRAINT fd_pt1chk1 CASCADE;
@@ -1678,6 +1701,7 @@ ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk3 CHECK (c2 <> '') NOT VALID;
Check constraints:
"fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1692,6 +1716,7 @@ Check constraints:
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
+Access method:
-- VALIDATE CONSTRAINT need do nothing on foreign tables
ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3;
@@ -1705,6 +1730,7 @@ ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3;
Check constraints:
"fd_pt1chk3" CHECK (c2 <> ''::text)
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1719,6 +1745,7 @@ Check constraints:
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
+Access method:
-- changes name of an attribute recursively
ALTER TABLE fd_pt1 RENAME COLUMN c1 TO f1;
@@ -1736,6 +1763,7 @@ ALTER TABLE fd_pt1 RENAME CONSTRAINT fd_pt1chk3 TO f2_check;
Check constraints:
"f2_check" CHECK (f2 <> ''::text)
Child tables: ft2
+Access method: heap
\d+ ft2
Foreign table "public.ft2"
@@ -1750,6 +1778,7 @@ Check constraints:
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
+Access method:
-- TRUNCATE doesn't work on foreign tables, either directly or recursively
TRUNCATE ft2; -- ERROR
@@ -1799,6 +1828,7 @@ CREATE FOREIGN TABLE fd_pt2_1 PARTITION OF fd_pt2 FOR VALUES IN (1)
c3 | date | | | | plain | |
Partition key: LIST (c1)
Partitions: fd_pt2_1 FOR VALUES IN (1)
+Access method: heap
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
@@ -1811,6 +1841,7 @@ Partition of: fd_pt2 FOR VALUES IN (1)
Partition constraint: ((c1 IS NOT NULL) AND (c1 = 1))
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
-- partition cannot have additional columns
DROP FOREIGN TABLE fd_pt2_1;
@@ -1830,6 +1861,7 @@ CREATE FOREIGN TABLE fd_pt2_1 (
c4 | character(1) | | | | | extended | |
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -- ERROR
ERROR: table "fd_pt2_1" contains column "c4" not found in parent "fd_pt2"
@@ -1844,6 +1876,7 @@ DROP FOREIGN TABLE fd_pt2_1;
c3 | date | | | | plain | |
Partition key: LIST (c1)
Number of partitions: 0
+Access method: heap
CREATE FOREIGN TABLE fd_pt2_1 (
c1 integer NOT NULL,
@@ -1859,6 +1892,7 @@ CREATE FOREIGN TABLE fd_pt2_1 (
c3 | date | | | | | plain | |
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
-- no attach partition validation occurs for foreign tables
ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1);
@@ -1871,6 +1905,7 @@ ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1);
c3 | date | | | | plain | |
Partition key: LIST (c1)
Partitions: fd_pt2_1 FOR VALUES IN (1)
+Access method: heap
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
@@ -1883,6 +1918,7 @@ Partition of: fd_pt2 FOR VALUES IN (1)
Partition constraint: ((c1 IS NOT NULL) AND (c1 = 1))
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
-- cannot add column to a partition
ALTER TABLE fd_pt2_1 ADD c4 char;
@@ -1899,6 +1935,7 @@ ALTER TABLE fd_pt2_1 ADD CONSTRAINT p21chk CHECK (c2 <> '');
c3 | date | | | | plain | |
Partition key: LIST (c1)
Partitions: fd_pt2_1 FOR VALUES IN (1)
+Access method: heap
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
@@ -1913,6 +1950,7 @@ Check constraints:
"p21chk" CHECK (c2 <> ''::text)
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
-- cannot drop inherited NOT NULL constraint from a partition
ALTER TABLE fd_pt2_1 ALTER c1 DROP NOT NULL;
@@ -1929,6 +1967,7 @@ ALTER TABLE fd_pt2 ALTER c2 SET NOT NULL;
c3 | date | | | | plain | |
Partition key: LIST (c1)
Number of partitions: 0
+Access method: heap
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
@@ -1941,6 +1980,7 @@ Check constraints:
"p21chk" CHECK (c2 <> ''::text)
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -- ERROR
ERROR: column "c2" in child table must be marked NOT NULL
@@ -1959,6 +1999,7 @@ Partition key: LIST (c1)
Check constraints:
"fd_pt2chk1" CHECK (c1 > 0)
Number of partitions: 0
+Access method: heap
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
@@ -1971,6 +2012,7 @@ Check constraints:
"p21chk" CHECK (c2 <> ''::text)
Server: s0
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
+Access method:
ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -- ERROR
ERROR: child table is missing constraint "fd_pt2chk1"
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index f259d07535..7bfc11c770 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -1001,6 +1001,7 @@ ALTER TABLE inhts RENAME d TO dd;
dd | integer | | | | plain | |
Inherits: inht1,
inhs1
+Access method: heap
DROP TABLE inhts;
-- Test for renaming in diamond inheritance
@@ -1021,6 +1022,7 @@ ALTER TABLE inht1 RENAME aa TO aaa;
z | integer | | | | plain | |
Inherits: inht2,
inht3
+Access method: heap
CREATE TABLE inhts (d int) INHERITS (inht2, inhs1);
NOTICE: merging multiple inherited definitions of column "b"
@@ -1038,6 +1040,7 @@ ERROR: cannot rename inherited column "b"
d | integer | | | | plain | |
Inherits: inht2,
inhs1
+Access method: heap
WITH RECURSIVE r AS (
SELECT 'inht1'::regclass AS inhrelid
@@ -1084,6 +1087,7 @@ CREATE TABLE test_constraints_inh () INHERITS (test_constraints);
Indexes:
"test_constraints_val1_val2_key" UNIQUE CONSTRAINT, btree (val1, val2)
Child tables: test_constraints_inh
+Access method: heap
ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key;
\d+ test_constraints
@@ -1094,6 +1098,7 @@ ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key
val1 | character varying | | | | extended | |
val2 | integer | | | | plain | |
Child tables: test_constraints_inh
+Access method: heap
\d+ test_constraints_inh
Table "public.test_constraints_inh"
@@ -1103,6 +1108,7 @@ Child tables: test_constraints_inh
val1 | character varying | | | | extended | |
val2 | integer | | | | plain | |
Inherits: test_constraints
+Access method: heap
DROP TABLE test_constraints_inh;
DROP TABLE test_constraints;
@@ -1119,6 +1125,7 @@ CREATE TABLE test_ex_constraints_inh () INHERITS (test_ex_constraints);
Indexes:
"test_ex_constraints_c_excl" EXCLUDE USING gist (c WITH &&)
Child tables: test_ex_constraints_inh
+Access method: heap
ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl;
\d+ test_ex_constraints
@@ -1127,6 +1134,7 @@ ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl;
--------+--------+-----------+----------+---------+---------+--------------+-------------
c | circle | | | | plain | |
Child tables: test_ex_constraints_inh
+Access method: heap
\d+ test_ex_constraints_inh
Table "public.test_ex_constraints_inh"
@@ -1134,6 +1142,7 @@ Child tables: test_ex_constraints_inh
--------+--------+-----------+----------+---------+---------+--------------+-------------
c | circle | | | | plain | |
Inherits: test_ex_constraints
+Access method: heap
DROP TABLE test_ex_constraints_inh;
DROP TABLE test_ex_constraints;
@@ -1150,6 +1159,7 @@ Indexes:
"test_primary_constraints_pkey" PRIMARY KEY, btree (id)
Referenced by:
TABLE "test_foreign_constraints" CONSTRAINT "test_foreign_constraints_id1_fkey" FOREIGN KEY (id1) REFERENCES test_primary_constraints(id)
+Access method: heap
\d+ test_foreign_constraints
Table "public.test_foreign_constraints"
@@ -1159,6 +1169,7 @@ Referenced by:
Foreign-key constraints:
"test_foreign_constraints_id1_fkey" FOREIGN KEY (id1) REFERENCES test_primary_constraints(id)
Child tables: test_foreign_constraints_inh
+Access method: heap
ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id1_fkey;
\d+ test_foreign_constraints
@@ -1167,6 +1178,7 @@ ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id
--------+---------+-----------+----------+---------+---------+--------------+-------------
id1 | integer | | | | plain | |
Child tables: test_foreign_constraints_inh
+Access method: heap
\d+ test_foreign_constraints_inh
Table "public.test_foreign_constraints_inh"
@@ -1174,6 +1186,7 @@ Child tables: test_foreign_constraints_inh
--------+---------+-----------+----------+---------+---------+--------------+-------------
id1 | integer | | | | plain | |
Inherits: test_foreign_constraints
+Access method: heap
DROP TABLE test_foreign_constraints_inh;
DROP TABLE test_foreign_constraints;
diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out
index 1cf6531c01..48ad462e3d 100644
--- a/src/test/regress/expected/insert.out
+++ b/src/test/regress/expected/insert.out
@@ -156,6 +156,7 @@ Rules:
irule3 AS
ON INSERT TO inserttest2 DO INSERT INTO inserttest (f4[1].if1, f4[1].if2[2]) SELECT new.f1,
new.f2
+Access method: heap
drop table inserttest2;
drop table inserttest;
@@ -461,6 +462,7 @@ Partitions: part_aa_bb FOR VALUES IN ('aa', 'bb'),
part_null FOR VALUES IN (NULL),
part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED,
part_default DEFAULT, PARTITIONED
+Access method: heap
-- cleanup
drop table range_parted, list_parted;
@@ -476,6 +478,7 @@ create table part_default partition of list_parted default;
a | integer | | | | plain | |
Partition of: list_parted DEFAULT
No partition constraint
+Access method: heap
insert into part_default values (null);
insert into part_default values (1);
@@ -813,6 +816,7 @@ Partitions: mcrparted1_lt_b FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVAL
mcrparted6_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE),
mcrparted7_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE),
mcrparted8_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, MAXVALUE)
+Access method: heap
\d+ mcrparted1_lt_b
Table "public.mcrparted1_lt_b"
@@ -822,6 +826,7 @@ Partitions: mcrparted1_lt_b FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVAL
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVALUE)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a < 'b'::text))
+Access method: heap
\d+ mcrparted2_b
Table "public.mcrparted2_b"
@@ -831,6 +836,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a < 'b'::text))
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'b'::text) AND (a < 'c'::text))
+Access method: heap
\d+ mcrparted3_c_to_common
Table "public.mcrparted3_c_to_common"
@@ -840,6 +846,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'b'::text)
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'c'::text) AND (a < 'common'::text))
+Access method: heap
\d+ mcrparted4_common_lt_0
Table "public.mcrparted4_common_lt_0"
@@ -849,6 +856,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'c'::text)
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('common', MINVALUE) TO ('common', 0)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::text) AND (b < 0))
+Access method: heap
\d+ mcrparted5_common_0_to_10
Table "public.mcrparted5_common_0_to_10"
@@ -858,6 +866,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::te
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('common', 0) TO ('common', 10)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::text) AND (b >= 0) AND (b < 10))
+Access method: heap
\d+ mcrparted6_common_ge_10
Table "public.mcrparted6_common_ge_10"
@@ -867,6 +876,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::te
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::text) AND (b >= 10))
+Access method: heap
\d+ mcrparted7_gt_common_lt_d
Table "public.mcrparted7_gt_common_lt_d"
@@ -876,6 +886,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::te
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a > 'common'::text) AND (a < 'd'::text))
+Access method: heap
\d+ mcrparted8_ge_d
Table "public.mcrparted8_ge_d"
@@ -885,6 +896,7 @@ Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a > 'common'::te
b | integer | | | | plain | |
Partition of: mcrparted FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, MAXVALUE)
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'd'::text))
+Access method: heap
insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10),
('comm', -10), ('common', -10), ('common', 0), ('common', 10),
diff --git a/src/test/regress/expected/matview.out b/src/test/regress/expected/matview.out
index 08cd4bea48..af943ea430 100644
--- a/src/test/regress/expected/matview.out
+++ b/src/test/regress/expected/matview.out
@@ -104,6 +104,7 @@ View definition:
mvtest_tv.totamt
FROM mvtest_tv
ORDER BY mvtest_tv.type;
+Access method: heap
\d+ mvtest_tvm
Materialized view "public.mvtest_tvm"
@@ -116,6 +117,7 @@ View definition:
mvtest_tv.totamt
FROM mvtest_tv
ORDER BY mvtest_tv.type;
+Access method: heap
\d+ mvtest_tvvm
Materialized view "public.mvtest_tvvm"
@@ -125,6 +127,7 @@ View definition:
View definition:
SELECT mvtest_tvv.grandtot
FROM mvtest_tvv;
+Access method: heap
\d+ mvtest_bb
Materialized view "public.mvtest_bb"
@@ -136,6 +139,7 @@ Indexes:
View definition:
SELECT mvtest_tvvmv.grandtot
FROM mvtest_tvvmv;
+Access method: heap
-- test schema behavior
CREATE SCHEMA mvtest_mvschema;
@@ -152,6 +156,7 @@ Indexes:
View definition:
SELECT sum(mvtest_tvm.totamt) AS grandtot
FROM mvtest_mvschema.mvtest_tvm;
+Access method: heap
SET search_path = mvtest_mvschema, public;
\d+ mvtest_tvm
@@ -165,6 +170,7 @@ View definition:
mvtest_tv.totamt
FROM mvtest_tv
ORDER BY mvtest_tv.type;
+Access method: heap
-- modify the underlying table data
INSERT INTO mvtest_t VALUES (6, 'z', 13);
@@ -369,6 +375,7 @@ UNION ALL
SELECT mvtest_vt2.moo,
3 * mvtest_vt2.moo
FROM mvtest_vt2;
+Access method: heap
CREATE MATERIALIZED VIEW mv_test3 AS SELECT * FROM mv_test2 WHERE moo = 12345;
SELECT relispopulated FROM pg_class WHERE oid = 'mv_test3'::regclass;
@@ -507,6 +514,7 @@ View definition:
'foo'::text AS u,
'foo'::text AS u2,
NULL::text AS n;
+Access method: heap
SELECT * FROM mv_unspecified_types;
i | num | u | u2 | n
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out
index afbbdd543d..439a592778 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -74,6 +74,7 @@ Indexes:
"testpub_tbl2_pkey" PRIMARY KEY, btree (id)
Publications:
"testpub_foralltables"
+Access method: heap
\dRp+ testpub_foralltables
Publication testpub_foralltables
@@ -150,6 +151,7 @@ Publications:
"testpib_ins_trunct"
"testpub_default"
"testpub_fortbl"
+Access method: heap
\d+ testpub_tbl1
Table "public.testpub_tbl1"
@@ -163,6 +165,7 @@ Publications:
"testpib_ins_trunct"
"testpub_default"
"testpub_fortbl"
+Access method: heap
\dRp+ testpub_default
Publication testpub_default
@@ -188,6 +191,7 @@ Indexes:
Publications:
"testpib_ins_trunct"
"testpub_fortbl"
+Access method: heap
-- permissions
SET ROLE regress_publication_user2;
diff --git a/src/test/regress/expected/replica_identity.out b/src/test/regress/expected/replica_identity.out
index 175ecd2879..9ae7a090b4 100644
--- a/src/test/regress/expected/replica_identity.out
+++ b/src/test/regress/expected/replica_identity.out
@@ -171,6 +171,7 @@ Indexes:
"test_replica_identity_hash" hash (nonkey)
"test_replica_identity_keyab" btree (keya, keyb)
Replica Identity: FULL
+Access method: heap
ALTER TABLE test_replica_identity REPLICA IDENTITY NOTHING;
SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass;
diff --git a/src/test/regress/expected/rowsecurity.out b/src/test/regress/expected/rowsecurity.out
index 1d12b01068..b01ff58c41 100644
--- a/src/test/regress/expected/rowsecurity.out
+++ b/src/test/regress/expected/rowsecurity.out
@@ -958,6 +958,7 @@ Policies:
Partitions: part_document_fiction FOR VALUES FROM (11) TO (12),
part_document_nonfiction FOR VALUES FROM (99) TO (100),
part_document_satire FOR VALUES FROM (55) TO (56)
+Access method: heap
SELECT * FROM pg_policies WHERE schemaname = 'regress_rls_schema' AND tablename like '%part_document%' ORDER BY policyname;
schemaname | tablename | policyname | permissive | roles | cmd | qual | with_check
diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out
index b68b8d273f..22c38ae2e8 100644
--- a/src/test/regress/expected/rules.out
+++ b/src/test/regress/expected/rules.out
@@ -2817,6 +2817,7 @@ Rules:
r3 AS
ON DELETE TO rules_src DO
NOTIFY rules_src_deletion
+Access method: heap
--
-- Ensure an aliased target relation for insert is correctly deparsed.
@@ -2845,6 +2846,7 @@ Rules:
r5 AS
ON UPDATE TO rules_src DO INSTEAD UPDATE rules_log trgt SET tag = 'updated'::text
WHERE trgt.f1 = new.f1
+Access method: heap
--
-- check alter rename rule
diff --git a/src/test/regress/expected/update.out b/src/test/regress/expected/update.out
index d09326c182..6b857bbc14 100644
--- a/src/test/regress/expected/update.out
+++ b/src/test/regress/expected/update.out
@@ -669,6 +669,7 @@ create table part_def partition of range_parted default;
e | character varying | | | | extended | |
Partition of: range_parted DEFAULT
Partition constraint: (NOT ((a IS NOT NULL) AND (b IS NOT NULL) AND (((a = 'a'::text) AND (b >= '1'::bigint) AND (b < '10'::bigint)) OR ((a = 'a'::text) AND (b >= '10'::bigint) AND (b < '20'::bigint)) OR ((a = 'b'::text) AND (b >= '1'::bigint) AND (b < '10'::bigint)) OR ((a = 'b'::text) AND (b >= '10'::bigint) AND (b < '20'::bigint)) OR ((a = 'b'::text) AND (b >= '20'::bigint) AND (b < '30'::bigint)))))
+Access method: heap
insert into range_parted values ('c', 9);
-- ok