Is there a python library that contains the functionality of the pg_dump, pg_dumpall and restore commands? I want to have the ability to handle exceptions where the standard commands do not allow for that level of control.
Is there anything out here that can help me?
You could try psycopg2. It's a python api to postgres, and you can use the copy_from and copy_to methods on the cursor to do it with StringIO
objects and do it all in memory, or just with the disk.
This is only good for data though, i believe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With