Re: Appending \o output instead of overwriting the output file

From: "Brent Wood" <b(dot)wood(at)niwa(dot)co(dot)nz>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Appending \o output instead of overwriting the output file
Date: 2009-02-18 20:12:39
Message-ID: 499D22870200007B00019479@gwia1.ham.niwa.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us> 02/18/09 7:46 PM >>>
"Brent Wood" <b(dot)wood(at)niwa(dot)co(dot)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 output file, 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-02-18 20:14:47 Re: COPY questions
Previous Message Jeff Davis 2009-02-18 19:51:07 Re: COPY questions