0

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

4

1 回答 1

9

最好使用pg_dump实用程序导出模式并重新加载到另一台机器上:

pg_dump -U postgres --schema-only db_name > file.txt

然后您可以使用psql实用程序将其加载回另一台机器/实例:

psql -U postgres db_name < file.txt
于 2013-02-24T11:00:11.027 回答