Re: Appending \o output instead of overwriting the output file - Mailing list pgsql-general

From Brent Wood
Subject Re: Appending \o output instead of overwriting the output file
Date
Msg-id 499D22870200007B00019479@gwia1.ham.niwa.co.nz
Whole thread Raw
Responses Re: Appending \o output instead of overwriting the output file
List pgsql-general
Thanks Tom,

That will do trick.

Perhaps \o+ as a future fix for this?


Brent

Brent Wood
DBA/GIS consultant
NIWA, Wellington
New Zealand
>>> Tom Lane <tgl@sss.pgh.pa.us> 02/18/09 7:46 PM >>>
"Brent Wood" <b.wood@niwa.co.nz> writes:
> Using \o to redirect output to a file from the psql command line, is there any way to have the output appended to the
outputfile, rather than overwriting it? 

This is pretty grotty, but it works:

\o | cat >>target

Maybe we should provide another way in future...

            regards, tom lane

NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: COPY questions
Next
From: Adrian Klaver
Date:
Subject: Re: COPY questions