line 50 of pg_dumpall (cvs of today) has

psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \

psql -l -A -q -t| tr '|' ' '

will return a list of databases beginning with the two lines

List of databases
Database Owner

and ending with

(n rows)

So, should psql's -q option suppress these three lines, or should pg_dumpall
get rid of them?

(We don't want to connect to database "List" as user "of" with encoding
"databases")

Cheers,

Patrick

Thu, 6 Jan 2000 20:48:26 +0000 (GMT)
"Patrick Welche,SCC,ext.35710," <prlw1@newn.cam.ac.uk>
pg_dumpall prob
> line 50 of pg_dumpall (cvs of today) has
> 
> psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \
> 
> psql -l -A -q -t| tr '|' ' '
> 
> will return a list of databases beginning with the two lines

OK, this is an artifact of the new psql format.  I have changed to the
code to be:

	psql -l -A -q -t | grep '|' | tr '|' ' ' | sed -n '2,$p' | \
	grep -v '^template1 ' | \

This removes all lines with no pipe, changes pipe to space, and removes
the first line and the template1 line from the output. This should work.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Thu, 6 Jan 2000 16:17:05 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] pg_dumpall prob