PostgreSQL 8.4 - dumping database connection privileges - Mailing list pgsql-bugs

From Russell Smith
Subject PostgreSQL 8.4 - dumping database connection privileges
Date
Msg-id 4BDBF507.5030006@pws.com.au
Whole thread Raw
Responses Re: PostgreSQL 8.4 - dumping database connection privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi,

I've recently upgraded to PostgreSQL 8.4 as Redhat had begun supporting
it.  I have tried to dump database grants, but have only found an
obscure way to do it.

I would expect;

postgres$ pg_dump -Fc database_name > backup.pgdump

would include all of the GRANT CONNECT on database_name TO "Role";
commands.  It does not.

Second I tried;

postgres$ pg_dumpall -g  > globals.sql

This also did not produce any GRANT CONNECT statements.


The only method I found that works is;

postgres$ pg_dumpall -s | grep 'ON DATABASE'

This method is not exactly fool proof and isn't what I expected to have
to do.


Is this considered a bug that the only way to do a dump/restore with
database privileges is to use pg_dumpall?  I expect that pg_dump of a
database would include all of that information.  I would argue it is at
least a misfeature and difficult for even an experienced user to understand.

Regards

Russell

pgsql-bugs by date:

Previous
From: Vladimir Kokovic
Date:
Subject: CVS build problem - make world target
Next
From: Robert Haas
Date:
Subject: Re: BUG #5444: Database Backup Restore - Out of memory problem