pg_dumpall - Mailing list pgsql-bugs

From Kardos, Dr. Andreas
Subject pg_dumpall
Date
Msg-id 0d6a01bf8522$17ad0320$99301eac@Dr.repas.de
Whole thread Raw
Responses Re: [BUGS] pg_dumpall
Re: [BUGS] pg_dumpall
Re: [BUGS] pg_dumpall
List pgsql-bugs
The pg_dumpall script is not compatible with 7.0 psql and createdb.

1. pgsql -l delivers a different output (Owner instead of User ID).
Therefore in the following command "usesysid" has to be replaced by
"usename":

 POSTGRES_USER="`echo \" \
  select usename \
  from pg_shadow \
  where usesysid = $DBUSERID; \" | \
  psql -A -q -t template1`"

2. createdb -help in the following line tries to connect the host "elp".

 if createdb -help|grep encoding >/dev/null
 then
  echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';"
 else
  echo "create database $DATABASE;"
 fi

Unfortunately it is not sufficient to use

createdb --help|grep encoding

because the word "encoding" is always present in the usage message now.

3. QNX4 only: The double quotes in

 POSTGRES_USER="`echo \" \

etc. must not be escaped with a backslash. Unfortunately I haven't found a
simple solution working on all platforms. Thats why I am not sending a
patch.

Andreas Kardos

pgsql-bugs by date:

Previous
From: "Rainer Tammer"
Date:
Subject: compilation on AIX 4.3.2 with international support
Next
From: Peter Eisentraut
Date:
Subject: Re: [GENERAL] Version 7.0 beta problem