Index: src/bin/pg_dump/pg_dumpall.sh =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.sh,v retrieving revision 1.16 diff -c -r1.16 pg_dumpall.sh *** src/bin/pg_dump/pg_dumpall.sh 24 Feb 2002 21:57:23 -0000 1.16 --- src/bin/pg_dump/pg_dumpall.sh 11 Apr 2002 04:46:09 -0000 *************** *** 8,14 **** # # $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.sh,v 1.16 2002/02/24 21:57:23 tgl Exp $ ! CMDNAME=`basename $0` # substituted at build VERSION='@VERSION@' --- 8,14 ---- # # $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.sh,v 1.16 2002/02/24 21:57:23 tgl Exp $ ! CMDNAME="`basename $0`" # substituted at build VERSION='@VERSION@' *************** *** 21,27 **** PGPATH= if echo "$0" | grep '/' > /dev/null 2>&1 ; then # explicit dir name given ! PGPATH=`echo $0 | sed 's,/[^/]*$,,'` # (dirname command is not portable) else # look for it in PATH ('which' command is not portable) for dir in `echo "$PATH" | sed 's/:/ /g'` ; do --- 21,27 ---- PGPATH= if echo "$0" | grep '/' > /dev/null 2>&1 ; then # explicit dir name given ! PGPATH=`echo "$0" | sed 's,/[^/]*$,,'` # (dirname command is not portable) else # look for it in PATH ('which' command is not portable) for dir in `echo "$PATH" | sed 's/:/ /g'` ; do *************** *** 78,84 **** while [ "$#" -gt 0 ] ; do ! case $1 in --help) usage=t break --- 78,84 ---- while [ "$#" -gt 0 ] ; do ! case "$1" in --help) usage=t break *************** *** 94,100 **** connectopts="$connectopts $1" ;; --host=*) ! connectopts="$connectopts -h "`echo $1 | sed 's/^--host=//'` ;; --port|-p) connectopts="$connectopts -p $2" --- 94,100 ---- connectopts="$connectopts $1" ;; --host=*) ! connectopts="$connectopts -h `echo $1 | sed 's/^--host=//'`" ;; --port|-p) connectopts="$connectopts -p $2" *************** *** 103,109 **** connectopts="$connectopts $1" ;; --port=*) ! connectopts="$connectopts -p "`echo $1 | sed 's/^--port=//'` ;; --user|--username|-U) connectopts="$connectopts -U $2" --- 103,109 ---- connectopts="$connectopts $1" ;; --port=*) ! connectopts="$connectopts -p `echo $1 | sed 's/^--port=//'`" ;; --user|--username|-U) connectopts="$connectopts -U $2" *************** *** 112,118 **** connectopts="$connectopts $1" ;; --user=*|--username=*) ! connectopts="$connectopts -U "`echo $1 | sed 's/^--user[^=]*=//'` ;; -W|--password) connectopts="$connectopts -W" --- 112,118 ---- connectopts="$connectopts $1" ;; --user=*|--username=*) ! connectopts="$connectopts -U `echo $1 | sed 's/^--user[^=]*=//'`" ;; -W|--password) connectopts="$connectopts -W" *************** *** 125,130 **** --- 125,134 ---- -g|--globals-only) globals_only=yes ;; + -F*|--format=*|-f|--file=*|-t|--table=*) + echo "pg_dump can not process option $1, exiting" 1>&2 + exit 1 + ;; *) pgdumpextraopts="$pgdumpextraopts $1" ;; *************** *** 214,225 **** # We skip databases marked not datallowconn, since we'd be unable to # connect to them anyway (and besides, we don't want to dump template0). - DATABASES="" - $PSQL -d template1 -At -F ' ' \ -c "SELECT datname, coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), pg_encoding_to_char(d.encoding), datistemplate, datpath FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) WHERE datallowconn ORDER BY 1;" | \ while read DATABASE DBOWNER ENCODING ISTEMPLATE DBPATH; do - DATABASES="$DATABASES $DATABASE" if [ "$DATABASE" != template1 ] ; then echo --- 218,226 ---- *************** *** 242,248 **** fi done ! for DATABASE in $DATABASES; do echo "dumping database \"$DATABASE\"..." 1>&2 echo echo "--" --- 243,251 ---- fi done ! $PSQL -d template1 -At -F ' ' \ ! -c "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;" | \ ! while read DATABASE; do echo "dumping database \"$DATABASE\"..." 1>&2 echo echo "--"