Getting a list of tables that a view/table depends on in PostgreSQL

后端 未结 4 1036
南笙
南笙 2021-01-13 05:39

In PostgreSQL, is there a way to get all of the tables that a view/table depends on based on its use of foreign keys and access to a given table?

Basically, I want t

4条回答
  •  独厮守ぢ
    2021-01-13 06:33

    In psql, adding + to the usual \d gives you a "Referenced by" list along with the table definition.

    \d+ tablename
    

提交回复
热议问题