如何保存PostgreSQL架构?

Jff*_*2ej 0 postgresql schema

我需要将PostgreSQL数据库的模式发送给客户.
我怎样才能做到这一点?
我在db目录中找不到它.

ale*_*oot 8

最好使用pg_dump实用程序导出架构并在另一台机器上加载:

pg_dump -U postgres --schema-only db_name > file.txt
Run Code Online (Sandbox Code Playgroud)

然后,您可以使用psql实用程序将其加载到另一台计算机/实例上:

psql -U postgres db_name < file.txt
Run Code Online (Sandbox Code Playgroud)