我有一个 postgres 模式,我想从中导出一些表。为此,我显然在命令--table
中使用了该标志pg_dump
。除了我需要将转储恢复到 postgres 服务器中并且由于缺少function
. 我也尝试将缺失的内容添加function
到pg_dump
命令中,但我不确定如何添加。
这是我认为应该起作用的;
pg_dump --dbname=foo --file=foo.dump --host=localhost --username=postgres --schema-only --table=bar --table=foo_function
此命令成功运行,没有任何错误,但在恢复时,foo_function
仍然丢失。我尝试寻找指定函数导出的方法,pg_dump
但找不到任何东西。请问我该怎么办?