-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Issue: \d does not show relation titles in pgcli output
When using the \d meta-command in pgcli, the output does not include the relation title (for example Table "public.users" or Index "public.users_pkey").
This occurs for all usages of \d, not just wildcard patterns. As a result, the output lacks context about which relation is being described and becomes difficult to read when multiple tables or indexes are involved.
In contrast, psql prints a clear title for each relation (relation type and fully qualified name) before its description, which makes the output much easier to understand.
pgcli output:
psql output:
Pgspecial Issue
This behavior appears to originate in pgspecial. The describe_one_table_details() method always returns None for the title field, leaving the client with no relation name to render.
Relevant code:
pgspecial/pgspecial/dbcommands.py
Lines 1804 to 1808 in 8e1f5db
| # /* reloptions, if verbose */ | |
| if verbose and tableinfo.reloptions: | |
| status.append(f"Options: {tableinfo.reloptions}\n") | |
| return (None, cells, headers, "".join(status)) |
Related discussion
A related issue has been raised on the pgcli side: dbcli/pgcli#1521
If this is something the maintainers are open to supporting, I’d be happy to contribute the change.