postgresql - 如何在 pg_dump 中获取模式的完整列表?

标签 postgresql pg-dump

如何在 pg_dump 实用程序中获取已知数据库 Postgresql 中模式的完整列表,以在单独的文件中备份每个模式?

现在我是这样使用的:

# pg_dump my_database

最佳答案

尝试

psql -c "select schema_name from information_schema.schemata" -At

仅返回名称,即适用于 shell 脚本。

关于postgresql - 如何在 pg_dump 中获取模式的完整列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24758784/

相关文章:

PostgreSQL 9.1.9。使用与可以为空的字段连接的字符串更新字段会出错

python - 我们可以用openERp计算净工资吗

postgresql自定义函数的便利性VS plpgsql

postgresql - 使用 pg_restore 从较新版本的 PostgreSQL 恢复

Linux bash 脚本运行不正确,但在命令行运行时一切正常

sql - 为什么 SELECT COUNT(id) 这么慢?

ruby-on-rails - PostgreSQL 和排序,在 Heroku 设置语言环境

postgresql - 在 pg_bouncer 后面使用 pg_dump 后,search_path 似乎被更改,其他客户端受到影响

postgresql - pg_dump 数据库转储是 'at-that-time' 转储吗?

postgresql - pg_dump 从远程服务器到本地主机