I am in charge of a system developed 8 years ago. When I make a dump of the postgres 8.1 database, all the postgis 1.5 functions are included. I have successfully migrated it to a postgres 9.1, because it still supports postgis 1.5, but as soon as I try to migrate to 9.4 I encounter many problems because of all the old spatial functions that are defined during the restore process. There are also all sorts of constraints defined using the old postgis 1.5 functions.

Is there an effective way of updating all these references from postgis 1.5 to postgis 2? Do I need to manually edit the backup files? (I have about 300 tables).

Thanks in advance :-)

1 Answer 1


Follow the hard upgrade procedure which uses postgis_restore.pl to help translate the differences between the versions.

  • Thank you very much, it worked. I had previously migrated from 8.1 to 8.4, from 8.4 to 9.0, and then from 9.0 to 9.1. I must, however, note that the migration from 9.0 to 9.1 had not be successful, as I thought at first. I ended up making a hard upgrade from 9.0 to 9.4.
    – Qaisa
    Mar 30, 2016 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.