How do I convert a binary pgdump (compressed) to a plain SQL file?

前端 未结 3 1354
無奈伤痛
無奈伤痛 2021-02-01 13:11

I do want to search for some data inside a database dump but these dumps are using the binary-compressed format (PGDMP header).

How can I convert these to

3条回答
  •  佛祖请我去吃肉
    2021-02-01 13:48

    The fastest method that I've used was:

    pg_restore mybinaryfile.backup > mysqlfile.sql
    

    No special flags, since pg_restore just spits it out to stdout.

提交回复
热议问题