postgresql trouble

October 30, 2007 at 9:30 am | Posted in postgresql, programming | Leave a comment

Just another post, to give a particular snippet I found on the web more visibility.

Today I ran into problems restoring a postgresql database from an sql dump. Since the same procedure did work before, I was a little worried; but after some googling I found the explanation (in Craig Hockenberry’s comment):

Note that when using pg_dump and a plain file format, that the escape string syntax described in will be used. If this file is then used to import on a previous version of postgres, the following error will be generated: ERROR:  type “e” does not exist.

Since there doesn’t appear to be any way to turn off this feature in pg_dump, the only solution is to upgrade the target database to version 8.1 or later.

Sure enough, I was trying to import a database dumped with 8.1.10 in a postgresql 7.4.7 cluster.

Blog at
Entries and comments feeds.