Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/bin/psql/describe.c
Original file line number Diff line number Diff line change
Expand Up @@ -4983,7 +4983,6 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
" WHEN " CppAsString2(RELKIND_MATVIEW) " THEN '%s'"
" WHEN " CppAsString2(RELKIND_INDEX) " THEN '%s'"
" WHEN " CppAsString2(RELKIND_SEQUENCE) " THEN '%s'"
" WHEN 's' THEN '%s'"
" WHEN " CppAsString2(RELKIND_TOASTVALUE) " THEN '%s'"
" WHEN " CppAsString2(RELKIND_FOREIGN_TABLE) " THEN '%s'"
" WHEN " CppAsString2(RELKIND_PARTITIONED_TABLE) " THEN '%s'"
Expand All @@ -4997,7 +4996,6 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
gettext_noop("materialized view"),
gettext_noop("index"),
gettext_noop("sequence"),
gettext_noop("special"),
gettext_noop("TOAST table"),
gettext_noop("foreign table"),
gettext_noop("partitioned table"),
Expand All @@ -5012,10 +5010,10 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
if (isGPDB7000OrLater())
{
appendPQExpBuffer(&buf, ", CASE c.relam");
appendPQExpBuffer(&buf, " WHEN %d THEN '%s'", HEAP_TABLE_AM_OID, gettext_noop("heap"));
appendPQExpBuffer(&buf, " WHEN %d THEN '%s'", AO_ROW_TABLE_AM_OID, gettext_noop("append only"));
appendPQExpBuffer(&buf, " WHEN %d THEN '%s'", AO_COLUMN_TABLE_AM_OID, gettext_noop("append only columnar"));
appendPQExpBuffer(&buf, " WHEN %d THEN '%s'", BTREE_AM_OID, gettext_noop("btree"));
appendPQExpBuffer(&buf, " ELSE (SELECT amname FROM pg_am WHERE pg_am.oid=c.relam)");

appendPQExpBuffer(&buf, " END as \"%s\"\n", gettext_noop("Storage"));
}
else
Expand Down
38 changes: 19 additions & 19 deletions src/test/regress/expected/psql.out
Original file line number Diff line number Diff line change
Expand Up @@ -2866,21 +2866,21 @@ Access method: heap

-- AM is displayed for tables, indexes and materialized views.
\d+
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+--------------------+-------------------+----------------------+---------+-------------+---------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | | permanent | heap_psql | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | | permanent | heap_psql | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | | 0 bytes |
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+--------------------+-------------------+----------------------+-----------+-------------+---------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | heap_psql | permanent | heap_psql | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | heap_psql | permanent | heap_psql | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | | 0 bytes |
(4 rows)

\dt+
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+---------------+-------+----------------------+---------+-------------+---------------+---------+-------------
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | | permanent | heap_psql | 0 bytes |
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+---------------+-------+----------------------+-----------+-------------+---------------+---------+-------------
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | heap_psql | permanent | heap_psql | 0 bytes |
(2 rows)

\dm+
Expand All @@ -2900,13 +2900,13 @@ Access method: heap

\set HIDE_TABLEAM on
\d+
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Size | Description
-----------------+--------------------+-------------------+----------------------+---------+-------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | | permanent | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | | permanent | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | 0 bytes |
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Size | Description
-----------------+--------------------+-------------------+----------------------+-----------+-------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | heap_psql | permanent | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | heap_psql | permanent | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | 0 bytes |
(4 rows)

RESET ROLE;
Expand Down
38 changes: 19 additions & 19 deletions src/test/singlenode_regress/expected/psql.out
Original file line number Diff line number Diff line change
Expand Up @@ -2866,21 +2866,21 @@ Access method: heap

-- AM is displayed for tables, indexes and materialized views.
\d+
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+--------------------+-------------------+----------------------+---------+-------------+---------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | | permanent | heap_psql | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | | permanent | heap_psql | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | | 0 bytes |
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+--------------------+-------------------+----------------------+-----------+-------------+---------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | heap_psql | permanent | heap_psql | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | heap_psql | permanent | heap_psql | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | | 0 bytes |
(4 rows)

\dt+
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+---------------+-------+----------------------+---------+-------------+---------------+---------+-------------
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | | permanent | heap_psql | 0 bytes |
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Access method | Size | Description
-----------------+---------------+-------+----------------------+-----------+-------------+---------------+---------+-------------
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | heap | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | heap_psql | permanent | heap_psql | 0 bytes |
(2 rows)

\dm+
Expand All @@ -2900,13 +2900,13 @@ Access method: heap

\set HIDE_TABLEAM on
\d+
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Size | Description
-----------------+--------------------+-------------------+----------------------+---------+-------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | | permanent | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | | permanent | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | 0 bytes |
List of relations
Schema | Name | Type | Owner | Storage | Persistence | Size | Description
-----------------+--------------------+-------------------+----------------------+-----------+-------------+---------+-------------
tableam_display | mat_view_heap_psql | materialized view | regress_display_role | heap_psql | permanent | 0 bytes |
tableam_display | tbl_heap | table | regress_display_role | heap | permanent | 0 bytes |
tableam_display | tbl_heap_psql | table | regress_display_role | heap_psql | permanent | 0 bytes |
tableam_display | view_heap_psql | view | regress_display_role | | permanent | 0 bytes |
(4 rows)

RESET ROLE;
Expand Down