Skip to content

Feature request: easily list/explore all objects (in schema) #1586

Open

Description

@halfgaar

In navigating a database with a lot of schemas, and a lot of different type of objects (tables, views, functions, data types, trigger, etc), there is a lot of friction in exploring the database because you have to manually list each type of object. And with schemas, the non-intuitive search path semantics make it extra hard.

I think it would be a great feature if one could just (as a figure of speech) cd into a schema and run ls [-l], which would then show everything and what it is.

Activity

  1. dbaty commented on Apr 26, 2026

    @dbaty
    Member

    Could you propose mockups of what you have in mind? What would the user do (type), what would the output look like? How would results be paginated, can the user filter on name, type of objects, etc. ?

    I think it could be a nice addition to pgcli... but it will be hard to beat or even match the many existing database browsers (graphical user interfaces) that provide such features (and much more). Also, let's be honest: unless someone contributes it (and that could be you!), it is likely to stay as an idea.

    Also, I'll note that one could achieve something similar by crafting an SQL query that looks at pg_class and other catalogs. That SQL query could be saved as one or more named queries for ease of use. (Obviously, it would probably not be as flexible as a dedicated command, but that may be good enough.)

  2. halfgaar commented on Apr 27, 2026

    @halfgaar
    Author

    I understand it's a bit of of an open-ended request. Instead of mock-ups, it would probably be a bit of prototyping when I'd take on such a task myself.

    Probably like you, time is an issue though. I may still do it, but it won't be soon.

    I'm not sure if you want to keep tentative issues open, but I'm fine with it being closed in the mean time.

    And thanks for the tip about the named queries. That will help me greatly as well, also for other regular tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions