Re: [PERFORM] psql -A (unaligned format) eats too much - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PERFORM] psql -A (unaligned format) eats too much
Date
Msg-id 448463DC.8030306@dunslane.net
Whole thread Raw
In response to Re: [PERFORM] psql -A (unaligned format) eats too much  ("Mark Woodward" <pgsql@mohawksoft.com>)
List pgsql-hackers
Mark Woodward wrote:
>>>>
>>>>
>>>>         
>>> Wouldn't the "COPY (select ...) TO STDOUT" format being discussed solve
>>> this for free?
>>>
>>>
>>>
>>>       
>> It won't solve it in the general case for clients that expect a result
>> set. ISTM that "use a cursor" is a perfectly reasonable answer, though.
>>     
>
> I'm not sure I agree -- surprise!
>
> psql is often used as a command line tool and using a cursor is not
> acceptable.
>
> Granted, with an unaligned output, perhaps psql should not buffer the
> WHOLE result at once, but without rewriting that behavior, a COPY from
> query may be close enough.
>
>   

You have missed my point. Surprise!

I didn't say it wasn't OK in the psql case, I said it wasn't helpful in 
the case of *other* libpq clients.

Expecting clients generally to split and interpret COPY output is not 
reasonable, but if they want large result sets they should use a cursor.

cheers

andrew



pgsql-hackers by date:

Previous
From: "Mark Woodward"
Date:
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much
Next
From: Zoltan Boszormenyi
Date:
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much