diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 709e10e..a6fc821 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2123,8 +2123,10 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys if (showIndexes) appendPQExpBuffer(&buf, - ",\n c2.relname as \"%s\"", - gettext_noop("Table")); + ",\n c2.relname as \"%s\"" + ",\n am.amname as \"%s\"", + gettext_noop("Table"), + gettext_noop("Method")); if (verbose && pset.sversion >= 80100) appendPQExpBuffer(&buf, @@ -2141,7 +2143,9 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys if (showIndexes) appendPQExpBuffer(&buf, "\n LEFT JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid" - "\n LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid"); + "\n LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid" + "\n LEFT JOIN pg_catalog.pg_am am ON am.oid = c.relam" + ); appendPQExpBuffer(&buf, "\nWHERE c.relkind IN ("); if (showTables)