diff --git a/seqs/postgres.sh b/seqs/postgres.sh index 17b2197..2a8d09e 100755 --- a/seqs/postgres.sh +++ b/seqs/postgres.sh @@ -77,9 +77,16 @@ step_6() { exe su ${toolUser} -c "psql -c \"SELECT pg_size_pretty( pg_database_size('$dbname') );\"" } -step_8_info() { echo "List all tables of postgres [DATABASE]"; } -step_8_alias() { ALIAS="listtables"; } +step_8_info() { echo "List available databases"; } +step_8_alias() { ALIAS="listdb"; } step_8() { + exe cd ~postgres + exe su ${toolUser} -c "psql -c '\l'" +} + +step_10_info() { echo "List all tables of postgres [DATABASE]"; } +step_10_alias() { ALIAS="listtables"; } +step_10() { shift local dbname=$1 if [ -z $dbname ]; then