Effortless(ly)
No.
You'd basically have to re-implement pg_dump
. This would not be fun.
You can COPY
out the tables using pg_copy_from
. Unsure if there's a PDO equivalent. This will let you dump the data relatively easily, combined with a query against information_schema
to get a table list.
Dumping the table definitions, users, constraints, indexes, etc, however ... good luck.