4 case $
(sudo
-u postgres psql template1
-t -c \
6 FROM pg_catalog.pg_database
12 sudo
-u postgres psql template1
-a -f - --set ON_ERROR_STOP
=1 <<-EOF
13 CREATE DATABASE $db WITH OWNER=$owner;
17 sudo
-u postgres psql template1
-a -f - --set ON_ERROR_STOP
=1 <<-EOF
18 REVOKE ALL ON DATABASE $db FROM public;
20 sudo
-u postgres psql
"$db" -a -f - --set ON_ERROR_STOP
=1 <<-EOF
21 GRANT ALL ON SCHEMA public TO $owner WITH GRANT OPTION;