Applied. I should have realized I was using the username to look up the
username.
-- Start of PGP signed section.
> 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.
> ---
> *** /usr/src/postgresql-7.0beta2/src/bin/pg_dump/pg_dumpall Tue Mar 7 18:09:34
>2000
> --- bin/pg_dumpall Sat Mar 18 16:37:37 2000
> ***************
> *** 51,66 ****
> 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"
>
> if pg_encoding $ENCODING >/dev/null 2>&1
> then
> ! echo "create database $DATABASE with encoding='`pg_encoding
>$ENCODING`';"
> else
> echo "create database $DATABASE;"
> fi
> --- 51,61 ----
> grep -v '^template1 ' | \
> while read DATABASE DBUSERID ENCODING DATAPATH
> do
> ! echo "${BS}connect template1 $DBUSERID"
>
> if pg_encoding $ENCODING >/dev/null 2>&1
> then
> ! echo "create database $DATABASE with encoding='$ENCODING';"
> else
> echo "create database $DATABASE;"
> fi
> ---
> ____________________}John Flinchbaugh{______________________
> | [EMAIL PROTECTED] http://www.hjsoft.com/~glynis/ |
> ~~Powered by Linux: Reboots are for hardware upgrades only~~-- End of PGP signed
>section.
--
Bruce Momjian | http://www.op.net/~candle
[EMAIL PROTECTED] | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026