diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-11-02 21:13:32 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-11-02 21:13:32 +0000 |
commit | b7f4c64202bd039194f4b9718969b66a83d5e98d (patch) | |
tree | 56212f204262c80ba37f5e6a900445c1ce439f14 /src | |
parent | cd5dbfb1154be4bfcb6fb55906a81906d04dd558 (diff) | |
download | postgresql-b7f4c64202bd039194f4b9718969b66a83d5e98d.tar.gz postgresql-b7f4c64202bd039194f4b9718969b66a83d5e98d.zip |
Add pg_dumpall --accounts-only option.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.sh b/src/bin/pg_dump/pg_dumpall.sh index f24922d3f37..feaa9c14a7d 100644 --- a/src/bin/pg_dump/pg_dumpall.sh +++ b/src/bin/pg_dump/pg_dumpall.sh @@ -6,7 +6,7 @@ # and "pg_group" tables, which belong to the whole installation rather # than any one individual database. # -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpall.sh,v 1.5 2000/10/25 10:21:38 pjw Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpall.sh,v 1.6 2000/11/02 21:13:32 petere Exp $ CMDNAME=`basename $0` @@ -72,6 +72,7 @@ fi usage= cleanschema= +accounts_only= # # Scan options. We're interested in the -h (host), -p (port), and -c (clean) options. @@ -109,6 +110,9 @@ while [ $# -gt 0 ] ; do cleanschema=yes pgdumpextraopts="$pgdumpextraopts -c" ;; + --accounts-only) + accounts_only=yes + ;; *) pgdumpextraopts="$pgdumpextraopts $1" ;; @@ -121,12 +125,13 @@ if [ "$usage" ] ; then echo "$CMDNAME dumps a PostgreSQL database cluster." echo echo "Usage:" - echo " $CMDNAME [ -c ] [ -h host ] [ -p port ]" + echo " $CMDNAME [ -c ] [ -h host ] [ -p port ] [ --accounts-only ]" echo echo "Options:" echo " -c, --clean clean (drop) schema prior to create" echo " -h, --host <hostname> server host name" echo " -p, --port <port> server port number" + echo " --accounts-only only dump users and groups" echo "Any extra options will be passed to pg_dump." echo echo "Report bugs to <pgsql-bugs@postgresql.org>." @@ -179,6 +184,9 @@ while read GRONAME GROSYSID GROLIST ; do done +test "$accounts_only" = yes && exit 0 + + # First we dump the template in case there are local extensions. echo |