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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brent Wood" <b(dot)wood(at)niwa(dot)co(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Appending \o output instead of overwriting the output file
Date: 2009-02-18 06:30:33
Message-ID: 760.1234938633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2009-02-18 07:00:57 Re: hi all
Previous Message Craig Ringer 2009-02-18 05:18:19 Re: hi all