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