diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-03-19 02:19:43 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-03-19 02:19:43 +0000 |
commit | 52d02657368efc2f6876ba5efa931b08f690758e (patch) | |
tree | 373740999b5310a81e940eabfa413f223abd2ba9 /src | |
parent | cfa929f601a07b4324cb236036b83dfabf1bdeef (diff) | |
download | postgresql-52d02657368efc2f6876ba5efa931b08f690758e.tar.gz postgresql-52d02657368efc2f6876ba5efa931b08f690758e.zip |
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, so
the ENCODING variable does not need to be translated to a number, but left
as the text representation. a patch is supplied to make the changes i
have found to work. i was successful dumping and reloading my database
after these changes.
-
John M. Flinchbaugh
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dumpall | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_dumpall b/src/bin/pg_dump/pg_dumpall index 1402b3ffdf3..586e75d530c 100644 --- a/src/bin/pg_dump/pg_dumpall +++ b/src/bin/pg_dump/pg_dumpall @@ -51,16 +51,11 @@ psql -l -A -q -t | grep '|' | tr '|' ' ' | \ grep -v '^template1 ' | \ while read DATABASE DBUSERID ENCODING DATAPATH do - POSTGRES_USER="`echo \" \ - select usename \ - from pg_shadow \ - where usename = $DBUSERID; \" | \ - psql -A -q -t template1`" - echo "${BS}connect template1 $POSTGRES_USER" + echo "${BS}connect template1 $DBUSERID" if pg_encoding $ENCODING >/dev/null 2>&1 then - echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';" + echo "create database $DATABASE with encoding='$ENCODING';" else echo "create database $DATABASE;" fi |