Re: normal user dump gives error because of plpgsql

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Janning Vygen <vygen(at)gmx(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: normal user dump gives error because of plpgsql
Date: 2005-03-10 17:02:12
Message-ID: 42307D94.8090501@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

I definitely want pl/pgsql in template1 so that any databases I create
have access to pl/pgsql without having to explicitly install it in each
new db I create in the cluster.

Recreating the database using psql dbname < dump.sql does work OK, but
not pg_restore.

Can pg_restore be made to ignore the error?

John Sidney-Woollett

Martijn van Oosterhout wrote:
> On Thu, Mar 10, 2005 at 01:31:26PM +0100, Janning Vygen wrote:
>
>>Hi,
>>
>>i have a normal user with rights to create a db. template1 contains language
>>plpgsql. the user wants to
>>- dump his db
>>- drop his db
>>- create it again
>>- and use the dump file to fill it.
>>
>>it gives errors because of CREATE LANGUAGE statements inside the dump.
>
>
> I don't beleive there is. But it's not really needed, you get and error
> and the restore continues. The only thing different is that you don't
> get a message, the result is the same.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-03-10 17:17:53 Re: normal user dump gives error because of plpgsql
Previous Message Michael Fuhr 2005-03-10 16:39:41 Re: Problem with inherited table, can you help?...