Tom Lane wrote:
John Sidney-Woollett <[EMAIL PROTECTED]> writes:

I'm pretty sure I had the same problem when using pg_restore. If pl/pgsql is installed in template1, then the restore fails.


And I couldn't find any solution to this on the list either.


You're supposed to restore into a database cloned from template0,
not template1.


That's interesting because I normally create my databases using template1 so that I don't have to install pl/pgsql before I start adding pgsql functions.


So what you're saying is that if you know you're just about to restore into a new DB (using pg_restore), then create the new DB from template0 instead of template1.

I've just spotted the Notes section for pg_restore in the 7.4.x docs which confirms this.

Strange that I didn't see it before... need to RTFM better!

Thanks.

John Sidney-Woollett

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to