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

From: Erik Jones <ejones(at)engineyard(dot)com>
To: Jasen Betts <jasen(at)xnet(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-19 18:40:12
Message-ID: 5AA8F9E6-CBC7-4119-875B-E0B0BD291BE6@engineyard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Feb 19, 2009, at 3:30 AM, Jasen Betts wrote:

> On 2009-02-18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> John R Pierce <pierce(at)hogranch(dot)com> writes:
>>> Tom Lane wrote:
>>>> "Brent Wood" <b(dot)wood(at)niwa(dot)co(dot)nz> writes:
>>>>> Perhaps \o+ as a future fix for this?
>>
>>>> I'd prefer "\o >>file" but maybe I'm too steeped in unix-isms.
>>
>>> \o+ is reasonably consistent with the other \ command usages...
>>
>> Not really; none of the other commands interpret + as meaning
>> "append to
>> an existing file". They tend to take it as meaning "do something *in
>> addition to* what you normally do", not to do something that is
>> significantly different from the base command.
>
> Yes, also if \o already supports | why not other plumbing symbols
> like >> and for completeness > (also possibly >& filedescriptor?)

I like that. Specifying other file descriptors (e.g. 2>) and
redirecting output from on fd to another (#>&) would be nice.

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k

In response to

Browse pgsql-general by date

  From Date Subject
Next Message SHARMILA JOTHIRAJAH 2009-02-19 19:07:46 Re: How to pipe the psql copy command to Unix 'Date' command
Previous Message Mike Christensen 2009-02-19 18:34:05 Re: When adding millions of rows at once, getting out of disk space errors