Add a --role option to pg_dump, pg_dumpall, and pg_restore. This allows
Tom Lane <tgl@sss.pgh.pa.us>
Add a --role option to pg_dump, pg_dumpall, and pg_restore. This allows performing dumps and restores in accordance with a security policy that forbids logging in directly as superuser, but instead specifies that you should log into an admin account and then SET ROLE to the superuser. In passing, clean up some ugly and mostly-broken code for quoting shell arguments in pg_dumpall. Benedek László, with some help from Tom Lane
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/pg_dumpall.sgml | modified | +33 −16 |
| doc/src/sgml/ref/pg_dump.sgml | modified | +18 −1 |
| doc/src/sgml/ref/pg_restore.sgml | modified | +28 −11 |
| src/bin/pg_dump/pg_backup_archiver.c | modified | +6 −3 |
| src/bin/pg_dump/pg_backup.h | modified | +2 −1 |
| src/bin/pg_dump/pg_dumpall.c | modified | +75 −73 |
| src/bin/pg_dump/pg_dump.c | modified | +19 −3 |
| src/bin/pg_dump/pg_restore.c | modified | +13 −6 |