More consistent error reporting

repack_all_database can return an error message: in case of any error different
from "missing schema" return the error and keep processing the other databases
instead of printing and stopping the program.

The output of the program is now something like:

    $ pg_reorg --all
    pg_reorg: reorg database "contrib_regression"
    pg_reorg: reorg database "template1" ... skipped: pg_reorg is not installed in the database
This commit is contained in:
Daniele Varrazzo
2012-10-18 00:18:27 +01:00
parent 0af231dff5
commit c43b6bdceb
2 changed files with 19 additions and 14 deletions

View File

@ -270,7 +270,7 @@ version load the script ``$SHAREDIR/contrib/uninstall_pg_repack.sql`` into the
database where the error occured and then load
``$SHAREDIR/contrib/pg_repack.sql`` again.
pg_repack: repack database "template1" ... skipped
pg_repack: reorg database "template1" ... skipped: pg_repack is not installed in the database
pg_repack is not installed in the database when ``--all`` option is
specified.