Skip to content
Snippets Groups Projects
Commit 233a52ea authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Fix pg_dumpall for new psql output.

parent e1a1f22f
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ copy tmp_pg_shadow to stdout;
drop table tmp_pg_shadow;
END
echo "${BS}."
psql -l -A -q -t | grep '|' | tr '|' ' ' | \
psql -A -q -t -c "select * from pg_database" template1 | grep '|' | tr '|' ' ' | \
grep -v '^template1 ' | \
while read DATABASE DBUSERID ENCODING DATAPATH
do
......@@ -55,7 +55,7 @@ do
if pg_encoding $ENCODING >/dev/null 2>&1
then
echo "create database $DATABASE with encoding='$ENCODING';"
echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';"
else
echo "create database $DATABASE;"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment