Fix pg_dumpall for new psql output.
This commit is contained in:
parent
e1a1f22f13
commit
233a52eaff
@ -47,7 +47,7 @@ copy tmp_pg_shadow to stdout;
|
|||||||
drop table tmp_pg_shadow;
|
drop table tmp_pg_shadow;
|
||||||
END
|
END
|
||||||
echo "${BS}."
|
echo "${BS}."
|
||||||
psql -l -A -q -t | grep '|' | tr '|' ' ' | \
|
psql -A -q -t -c "select * from pg_database" template1 | grep '|' | tr '|' ' ' | \
|
||||||
grep -v '^template1 ' | \
|
grep -v '^template1 ' | \
|
||||||
while read DATABASE DBUSERID ENCODING DATAPATH
|
while read DATABASE DBUSERID ENCODING DATAPATH
|
||||||
do
|
do
|
||||||
@ -55,7 +55,7 @@ do
|
|||||||
|
|
||||||
if pg_encoding $ENCODING >/dev/null 2>&1
|
if pg_encoding $ENCODING >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "create database $DATABASE with encoding='$ENCODING';"
|
echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';"
|
||||||
else
|
else
|
||||||
echo "create database $DATABASE;"
|
echo "create database $DATABASE;"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user