From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_dump 7.4 bug |
Date: | 2004-03-29 15:39:07 |
Message-ID: | 4068431B.1050701@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
If you do this sequence of events, you get a failure to restore:
1. As superuser, do this:
test2=# CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler
test2-# AS '$libdir/plpgsql.so', 'plpgsql_call_handler'
test2-# LANGUAGE c;
CREATE FUNCTION
2. Drop privs.
test2=# alter user chriskl with nocreateuser;
So, now we're a regular joe user.
3. pg_dump now gives this:
SET SESSION AUTHORIZATION 'chriskl';
SET search_path = public, pg_catalog;
--
-- TOC entry 37 (OID 853309)
-- Name: plpgsql_call_handler(); Type: FUNC PROCEDURAL LANGUAGE; Schema:
public; Owner: chriskl
--
CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
AS '$libdir/plpgsql.so', 'plpgsql_call_handler'
LANGUAGE c;
4. Now, trying to restore this as the joe user gives:
test2=> CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
test2-> AS '$libdir/plpgsql.so', 'plpgsql_call_handler'
test2-> LANGUAGE c;
ERROR: permission denied for language c
This caused me pain in the 7.4 upgrade I just performed...
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-29 15:46:13 | Re: Row sampling.. |
Previous Message | Tom Lane | 2004-03-29 15:29:26 | Re: Fuzzy cost comparison to eliminate redundant planning |