Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52d0265

Browse files
committed
it seems in the beta2 release DBUSERID in pg_dumpall is the _name_ of the
user, so it doesn't need to be translated from the number to the name.also ``create database ...'' does not take numbers for the encoding, sothe ENCODING variable does not need to be translated to a number, but leftas the text representation. a patch is supplied to make the changes ihave found to work. i was successful dumping and reloading my databaseafter these changes.-John M. Flinchbaugh
1 parentcfa929f commit52d0265

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

‎src/bin/pg_dump/pg_dumpall

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,11 @@ psql -l -A -q -t | grep '|' | tr '|' ' ' | \
5151
grep -v '^template1 ' |\
5252
while read DATABASE DBUSERID ENCODING DATAPATH
5353
do
54-
POSTGRES_USER="`echo\" \
55-
selectusename \
56-
from pg_shadow \
57-
where usename =$DBUSERID;\"| \
58-
psql -A -q -t template1`"
59-
echo"${BS}connect template1$POSTGRES_USER"
54+
echo"${BS}connect template1$DBUSERID"
6055
6156
if pg_encoding$ENCODING >/dev/null 2>&1
6257
then
63-
echo"create database$DATABASE with encoding='`pg_encoding$ENCODING`';"
58+
echo"create database$DATABASE with encoding='$ENCODING';"
6459
else
6560
echo"create database$DATABASE;"
6661
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp