微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

分享一段greenplum/postgresql单独恢复存储过程的语句摘录翻译

(我估计大家也都看得懂,我还是在下面谢了大体意思~)

You can't tell pg_dump to dump only functions. However,you can make a dump without data (-s) and filter it on restoring. Note the -Fc part: this will produce a file suitable for pg_restore.

译:我们不能使用pg_dump工具单独导出存储过程。但是,可以先把所有的模式结构都导出来,然后恢复的时候指定只恢复存储过程。注意-Fc选项的意思:生成一个可供pg_restore使用的文件

Firsttakethedump:
译:首先导出:
[gpadmin@master~]$pg_dump-Uusername-Fc-s-fdump_testyour_database
Thencreatealistofthefunctions:
译:创建一个包含所有函数文件:
[gpadmin@master~]$pg_restore-ldump_test|grepFUNCTION>function_list
Andfinallyrestorethem(-Lspecifiesthelistfilecreatedabove):
译:最后用-L参数指定上面创建的函数文件来恢复:
[gpadmin@master~]$pg_restore-Uusername-dyour_other_database-Lfunction_listdump_test

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐