Appending \o output instead of overwriting the output file
Appending \o output instead of overwriting the output file
От:
"Brent Wood" <b.wood@niwa.co.nz>
Дата:
Hi, 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? Thanks, Brent Woood Brent Wood DBA/GIS consultant NIWA, Wellington New Zealand NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
Re: Appending \o output instead of overwriting the output file
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Brent Wood" 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
Re: Appending \o output instead of overwriting the output file
От:
Abdul Rahman <abr_ora@yahoo.com>
Дата:
Simply use '\o filename' as you are doing so. Write the queries as much as you want. It will automatically append the result in the specified file. Untill you use '\o' command again with new file name.