normal user dump gives error because of plpgsql

From: Janning Vygen <vygen(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: normal user dump gives error because of plpgsql
Date: 2005-03-10 12:31:26
Message-ID: 200503101331.26847.vygen@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Miroslav Šulc 2005-03-10 12:40:27 Re: Locale problem
Previous Message Janning Vygen 2005-03-10 12:22:54 normal user dump gives error because of plpgsql