Using Toad for Oracle, I can generate full DDL files describing all tables, views, source code (procedures, functions, packages), sequences, and grants of an Oracle schema. A great feature is that it separates each DDL declaration into different files (a file for each object, be it a table, a procedure, a view, etc.) so I can write code and see the structure of the database without a DB connection. The other benefit of working with DDL files is that I don't have to connect to the database to generate a DDL each time I need to review table definitions. In Toad for Oracle, the way to do this is to go to Database -> Export and select the appropriate menu item depending on what you want to export. It gives you a nice picture of the database at that point in time.

是否有导出的"批处理"工具

PostgreSQL呢

我不喜欢这个工具是开源的还是商业的.

推荐答案

在PostgreSQL中,只需使用-s选项来pg_dump.您可以将其作为一个普通sql脚本(整个数据库中只有一个文件)以自定义格式保存,然后可以在每个对象上抛出一个脚本来获取一个文件(如果需要).

PgAdmin工具还将向您展示每个对象的SQL转储,但我认为没有一种很好的方法可以从那里一次获取所有对象.

Postgresql相关问答推荐

带有regex表达式的Postgres SQL

Postgr不列出运算符和函数

Postgresql我必须创建一个索引还是已经有一个索引了?

Postgres SQL:获取列值在连续日期之间已更改的行

如何在PostgreSQL中以行值的形式获取列

即使不对订阅服务器进行任何修改,Postgres逻辑复制也可能发生冲突吗?

docker-compose.yml用于使用postgres的spring-boot应用程序

select语句的Jooq代码生成

在Postgre中的链接服务器上执行远程查询

PostgreSQL:在timestamp::DATE 上创建索引

表或列名不能以数字开头?

在查询中的复合外键/主键列上连接表

Rails 4查询由单个属性唯一

安装时 postgres 的默认用户

是否可以在 CSV 格式的 Postgres COPY 命令中关闭报价处理?

如何为 postgres 编写 DELETE CASCADE?

使用 PostgreSQL 进行字母数字排序

在 pg_restore 期间排除表

Ecto Postgres 安装错误密码验证失败

PostgreSQL 9.1:如何连接数组中的行而不重复,加入另一个表