Skip to content

Commit 91124a2

Browse files
committed
Fix problems with pg_upgrade found by Kardos, Dr. Andrea
1 parent 52d39d5 commit 91124a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_dump/pg_dumpall

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ do
5454
POSTGRES_USER="`echo \" \
5555
select usename \
5656
from pg_shadow \
57-
where usesysid = $DBUSERID; \" | \
57+
where usename = $DBUSERID; \" | \
5858
psql -A -q -t template1`"
5959
echo "${BS}connect template1 $POSTGRES_USER"
6060
61-
if createdb -help|grep encoding >/dev/null
61+
if pg_encoding $ENCODING >/dev/null 2>&1
6262
then
6363
echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';"
6464
else

0 commit comments

Comments
 (0)