Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个从 Heroku 应用程序导出的 postgres 转储文件。
有没有办法从 pg 转储文件或 Heroku 应用程序中导出插入命令?
如果转储文件是纯文本 - 您可以使用类似grep或其他文本处理工具。
grep
如果转储是二进制的 - 使用pg_restore --data-only --file=out.sql dump.file
pg_restore --data-only --file=out.sql dump.file
细节:pg_restore
pg_restore