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

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

    I think it is a quite bad idea. Just copy the whole database, I think that the application wants to have all data, not only data from one table. What's more, there are also triggers, that could depend on some tables, but to know that you'd have to make not so easy code analysis.

提交回复
热议问题