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

From Janning Vygen
Subject normal user dump gives error because of plpgsql
Date
Msg-id 200503101331.26847.vygen@gmx.de
Whole thread Raw
Responses Re: normal user dump gives error because of plpgsql
List pgsql-general
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.

How can i prevent that the dump contains CREATE LANGUAGE statements. They are
not needed if template1 contains the language, right?

I didnt found anythng in the archives even though i am sure not to be the
first one having this problem.

kind regards,
janning

here is what i did with 7.4.6:

+++ AS DB SUPERUSER

# createlang plpgsql template1
# createuser -Ad testuser
CREATE USER
# su testuser

+++ AS TESTUSER
$ createdb
$ pg_dump -O -x > /tmp/dump.sql
$ dropdb
$ createdb
$ psql testuser < /tmp/dump.sql
SET
SET
SET
ERROR:  permission denied for language c
ERROR:  must be superuser to create procedural language
ERROR:  must be owner of schema public

kind regards,
janning

--
PLANWERK 6 websolutions
Herzogstraße 85, 40215 Düsseldorf
Tel.: 0211-6015919 Fax: 0211-6015917
http://www.planwerk6.de/

pgsql-general by date:

Previous
From: Shaun Clements
Date:
Subject: Re: pl sql to check if table of table_name exists
Next
From: Miroslav Šulc
Date:
Subject: Re: Locale problem