Re: normal user dump gives error because of plpgsql - Mailing list pgsql-general

From John Sidney-Woollett
Subject Re: normal user dump gives error because of plpgsql
Date
Msg-id 423086A6.9020408@wardbrook.com
Whole thread Raw
In response to Re: normal user dump gives error because of plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:
> John Sidney-Woollett <johnsw@wardbrook.com> 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

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: PostgreSQL still for Linux only?
Next
From: Amin Abdulghani
Date:
Subject: postgres 7.4 build for win