Обсуждение: pg_restore not working
Howdy. I did an export of a 7.1.3 database using the example pg_dump -Ft -b mydatabase > file.tar. I then tried to do a pg_restore on my 7.2.1 database but kept running into errors. First off, the users were not defined, so I tried -O but that didn't work. It kept saying that the user wasn't defined. So I manually created the database and tried to do the import and create only the schema. However, I now run into the problem of /usr/lib/plpgsql.so file not being found. I was able to do a createlang, so I know the file exists some place on my machine. So how can I get around this? Can I edit the file in the file.tar file? And if so, how? I'm sorry, I'm not that Linux savvy. TIA Patrick Hatcher
--- Patrick Hatcher <PHatcher@macys.com> wrote: Howdy. > It kept saying that the user wasn't defined. - try the "createuser" command So I manually created the database > and tried to do the > import and create only the schema. However, I now > run into the problem of > /usr/lib/plpgsql.so file not being found. In your linux command prompt type : whereis plpgsql.so this should return where your plpgsql.so is located and you can copy the file to /usr/lib > Can I edit the file in the file.tar > file? And if so, how? tar -xvzpf <filename of your tar file> After that you can edit the file produce by the command above since it is text file containing SQL statement. You might not want to do this if the database is very large. ludwig. __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com