a dirty c program to quickly munge a postgres 9.3 plain sql dump so that it can be loaded into postgres 8.2
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
Makefile
README
config.mk
munge_pg_93_to_82.c

README

A dirty c program to quickly munge a postgres 9.3 plain sql dump so that it can be loaded into postgres 8.2

For more information see [http://segfault.net.nz/posts/2014-10-19-postgres-replication-93-to-82.html]

Compile:

    make

Run:
    ./munge_pg_93_to_82 path_to_pg_93_plain_sql_dump.sql

and then continue loading your pg dump as per usual

    psql -h foo -U bar -d baz -f path_to_pg_93_plain_sql_dump.sql


---

Known issues:

* It is possible for munge_pg_93_to_82 to successfully modify the first line, and then fail to modify the second, leaving the edited file half-done. It is trivial to changing the order of the read/writes to reduce the changes of this occuring.