-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjjT+wgACgkQCGPRljI8083ciACdHZNDQwxEedRPMgjSv8eh+udP
/HsAniBFWye7wtJq+MQWJ3mwpRducr3n
=DcIy
-----END PGP SIGNATURE-----

Reply via email to