Re: [HACKERS] pg_dumpall prob

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: prlw1(at)cam(dot)ac(dot)uk
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] pg_dumpall prob
Date: 2000-01-06 21:17:05
Message-ID: 200001062117.QAA21472@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

  • pg_dumpall prob at 2000-01-06 20:48:26 from Patrick Welche,SCC,ext.35710,

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2000-01-06 21:30:14 Re: [GENERAL] New Search Engine ... UdmSearch
Previous Message Ansley, Michael 2000-01-06 21:08:33 RE: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL