This snippet in pg_dumpall

$PSQL -d template1 -At -F ' ' \
  -c "SELECT datname, usename, pg_encoding_to_char(d.encoding),
datistemplate, datpath FROM pg_database d LEFT JOIN pg_shadow u ON (datdba
= usesysid) WHERE datallowconn;" | \
while read DATABASE DBOWNER ENCODING ISTEMPLATE DBPATH; do

(line breaks messed up)

won't actually work if there indeed happens to be a database without a
valid owner, because the 'read' command will take ENCODING as the dba
name.

I guess the real question is, what should be done in this case?  I think
it might be better to error out and let the user fix his database before
backing it up.

(At a glance, I think pg_dump also has some problems with these sort of
constellations.)

-- 
Peter Eisentraut      [EMAIL PROTECTED]       http://yi.org/peter-e/

Reply via email to