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

后端 未结 4 1037
南笙
南笙 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:15

    Assuming you have your foreign keys set up correctly, use pg_dump to dump the table definitions.

    pg_dump -s -t TABLENAME
    

提交回复
热议问题