if (!showSystem && !pattern)
appendPQExpBuffer(&buf, " AND n.nspname <> 'pg_catalog'\n"
- " AND n.nspname <> 'information_schema'\n"
- " AND n.nspname !~ '^pg_toast'\n");
+ " AND n.nspname <> 'information_schema'\n");
+
+ /*
+ * TOAST objects are suppressed unconditionally. Since we don't provide
+ * any way to select relkind 't' above, we would never show toast tables
+ * in any case; it seems a bit confusing to allow their indexes to be
+ * shown. Use plain \d if you really need to look at a TOAST table/index.
+ */
+ appendPQExpBuffer(&buf, " AND n.nspname !~ '^pg_toast'\n");
processSQLNamePattern(pset.db, &buf, pattern, true, false,
"n.nspname", "c.relname", NULL,