未验证 提交 999f187e 编写于 作者: J Jinbao Chen 提交者: GitHub

Fixed the \dm empty output error (#10163)

The psql client ignored rel storage when he create the \dm command.
So the output of \dm was empty. Add the correct rel storage check in command.
上级 644bde25
......@@ -4026,7 +4026,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
if (isGPDB()) /* GPDB? */
{
appendPQExpBuffer(&buf, "AND c.relstorage IN (");
if (showTables || showIndexes || showSeq || (showSystem && showTables))
if (showTables || showIndexes || showSeq || (showSystem && showTables) || showMatViews)
appendPQExpBuffer(&buf, "'h', 'a', 'c',");
if (showExternal)
appendPQExpBuffer(&buf, "'x',");
......
......@@ -104,3 +104,24 @@ SELECT * FROM m_aocs;
x | 5
(3 rows)
\dm m_heap
List of relations
Schema | Name | Type | Owner
--------+--------+-------------------+---------
public | m_heap | materialized view | gpadmin
(1 row)
\dm m_ao
List of relations
Schema | Name | Type | Owner
--------+------+-------------------+---------
public | m_ao | materialized view | gpadmin
(1 row)
\dm m_aocs
List of relations
Schema | Name | Type | Owner
--------+--------+-------------------+---------
public | m_aocs | materialized view | gpadmin
(1 row)
......@@ -40,3 +40,6 @@ SELECT * FROM m_aocs;
REFRESH MATERIALIZED VIEW m_aocs;
SELECT * FROM m_aocs;
\dm m_heap
\dm m_ao
\dm m_aocs
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册