Skip to content

feat: add S suffix for system-object variants of relation commands#162

Draft
devadathanmb wants to merge 5 commits into
dbcli:mainfrom
devadathanmb:fix/system-object-suffix
Draft

feat: add S suffix for system-object variants of relation commands#162
devadathanmb wants to merge 5 commits into
dbcli:mainfrom
devadathanmb:fix/system-object-suffix

Conversation

@devadathanmb

@devadathanmb devadathanmb commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

Continues the work started in #160.

psql lets you append S to \d-family commands (\dtS, \dvS, \dS) to include system objects from pg_catalog and information_schema. Running \dS in pgcli produces an error.

This adds S variants for all relation-listing commands:

Command Description
\dS List or describe user and system relations
\dtS List user and system tables
\dvS List user and system views
\dmS List user and system materialized views
\dsS List user and system sequences
\diS List user and system indexes
\dES List user and system foreign tables

All variants support the + verbose modifier (e.g. \dtS+).

Closes dbcli/pgcli#1523

Checklist

  • I've added this contribution to the changelog.rst.
  • I installed pre-commit hooks (pip install pre-commit && pre-commit install).
  • Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

- add S variants for relation listing and description while preserving schema visibility
- match psql pattern, special-relation, TOAST, and partitioned-index behavior
- add catalog, visibility, detail, and TOAST tests plus a changelog entry
- add a partitioned table and index to the shared database fixture
- verify `\diS` includes partitioned indexes
- verify `\dtS+` returns verbose relation metadata
- remove partitioned-index objects from the shared database setup
- create and clean up the objects within the relevant test
- skip the test when partitioned indexes are unsupported
- Route \dE and \dES through a shared private helper.
- Omit system-schema exclusions for \dES and advertise its S modifier.
- Add FDW integration coverage for \dES.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

\dS command not recognized in pgcli (works in psql)

1 participant