We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1a1f22 commit 233a52eCopy full SHA for 233a52e
src/bin/pg_dump/pg_dumpall
@@ -47,15 +47,15 @@ copy tmp_pg_shadow to stdout;
47
drop table tmp_pg_shadow;
48
END
49
echo "${BS}."
50
-psql -l -A -q -t | grep '|' | tr '|' ' ' | \
+psql -A -q -t -c "select * from pg_database" template1 | grep '|' | tr '|' ' ' | \
51
grep -v '^template1 ' | \
52
while read DATABASE DBUSERID ENCODING DATAPATH
53
do
54
echo "${BS}connect template1 $DBUSERID"
55
56
if pg_encoding $ENCODING >/dev/null 2>&1
57
then
58
- echo "create database $DATABASE with encoding='$ENCODING';"
+ echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';"
59
else
60
echo "create database $DATABASE;"
61
fi
0 commit comments