pg_dump roles support - Mailing list pgsql-hackers

From Stephen Frost
Subject pg_dump roles support
Date
Msg-id 20071210160217.GP5031@tamriel.snowman.net
Whole thread Raw
Responses Re: pg_dump roles support
Re: pg_dump roles support
List pgsql-hackers
Greetings,
 Discussing psql options made me recall an annoying problem that we've run into.  There's no way (unless it was added
to8.3 and I missed it, but I don't think so) to tell pg_dump 'switch to this role before doing anything else'.  That's
veryfrustrating when you use no-inherit roles for admins.  eg:
 
 create role admin with noinherit; grant postgres to admin; grant admin to joesysadmin;
 pg_dump -U joesysadmin mydb;
 Fails because joesysadmin hasn't got rights to everything directly. It'd be nice if pg_dump could take a '-r postgres'
to'set role' to a role which has the necessary permissions before locking all the tables and whatnot.  The same 'set
role'would also be included at the top of the resulting dump file.  We could have a seperate flag for that but I don't
thinkit's necessary.
 
 Comments?
 I doubt there'd be very much code involved but I'd be willing to write a patch if people agree with the general
idea/approach.
     Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Release Note Changes
Next
From: Andrew Dunstan
Date:
Subject: Re: Release Note Changes