On Fri, 17 Dec 1999, Bruce Momjian wrote:
> > It would be nice for new users; I think it would make it easier
> > for them to actually set out and do it. Many new users are
> > of the not-so-knowledgable variety, and shell scripting isn't
> > something they want to undertake.
>
> Can someone modify the vacuumdb shell script to do that?
i tried it... it seems to work
--
nek;(
--- /usr/bin/vacuumdb Sun Sep 26 22:41:17 1999
+++ ./vacuumdb Sat Dec 18 08:14:03 1999
@@ -42,2 +42,3 @@
--verbose) verbose="verbose";;
+ --alldb) dbname="`psql -t -A -d template1 -c 'SELECT datname FROM
+pg_database'`";;
@@ -89,5 +90,5 @@
fi
-
-psql $PASSWDOPT -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "vacuum $verbose $analyze
$table" $dbname
-
+for db in $dbname; do
+psql $PASSWDOPT -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "vacuum $verbose $analyze
+$table" $db
+done;
if [ $? -ne 0 ]; then