Thread: pgsql: Add a --role option to pg_dump, pg_dumpall, and pg_restore.

pgsql: Add a --role option to pg_dump, pg_dumpall, and pg_restore.

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
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

Modified Files:
--------------
    pgsql/doc/src/sgml/ref:
        pg_dump.sgml (r1.105 -> r1.106)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/pg_dump.sgml?r1=1.105&r2=1.106)
        pg_dumpall.sgml (r1.73 -> r1.74)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/pg_dumpall.sgml?r1=1.73&r2=1.74)
        pg_restore.sgml (r1.76 -> r1.77)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/pg_restore.sgml?r1=1.76&r2=1.77)
    pgsql/src/bin/pg_dump:
        pg_backup.h (r1.47 -> r1.48)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup.h?r1=1.47&r2=1.48)
        pg_backup_archiver.c (r1.159 -> r1.160)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup_archiver.c?r1=1.159&r2=1.160)
        pg_dump.c (r1.511 -> r1.512)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.511&r2=1.512)
        pg_dumpall.c (r1.110 -> r1.111)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dumpall.c?r1=1.110&r2=1.111)
        pg_restore.c (r1.89 -> r1.90)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_restore.c?r1=1.89&r2=1.90)