sor*_*rin 38 postgresql pg-dump pg-restore
我想在数据库转储中搜索一些数据,但这些转储使用二进制压缩格式(PGDMP
标头).
如何在不恢复它们的情况下将这些转换为SQL?
Cra*_*ger 64
pg_restore
,在没有数据库名称的情况下运行时,将文本转储输出到stdout; 您可以-f
使用I/O重定向或其他方式将其发送到其他地方.
pg_restore -f mydatabase.sql mydatabase.dump
Run Code Online (Sandbox Code Playgroud)
kno*_*lya 13
我用过的最快的方法是:
pg_restore mybinaryfile.backup > mysqlfile.sql
Run Code Online (Sandbox Code Playgroud)
没有特殊的标志,因为pg_restore只是将它吐出到stdout.
归档时间: |
|
查看次数: |
20319 次 |
最近记录: |