Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从pg_dumpall. 但是,如果此时 postgres 中有任何数据,我希望还原失败。有没有办法检查这个?换句话说,我希望我的恢复只能在一个完全空的数据库(即用户定义的表)中工作。我的 postgres 版本是 9.6
pg_dumpall
可以通过pg_catalog.pg_stat_user_tables系统视图检索用户定义的表。
pg_catalog.pg_stat_user_tables