pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Mark Woodward <pgsql@mohawksoft.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jim C. Nasby <jnasby@pervasive.com>
Cc: Zoltan Boszormenyi <zboszor@dunaweb.hu>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much
Date: Mon, 05 Jun 2006 13:03:24 -0400
Message-ID: <448463DC.8030306@dunslane.net> (raw)
In-Reply-To: <18067.24.91.171.78.1149526905.squirrel@mail.mohawksoft.com>
References: <44835834.2020309@dunaweb.hu>
	<44835F86.5040008@dunaweb.hu>
	<20060605152258.GT53487@pervasive.com>
	<20512.1149521250@sss.pgh.pa.us>
	<20060605155349.GU53487@pervasive.com>
	<20813.1149523235@sss.pgh.pa.us>
	<18006.24.91.171.78.1149526092.squirrel@mail.mohawksoft.com>
	<44845E86.3080001@dunslane.net>
	<18067.24.91.171.78.1149526905.squirrel@mail.mohawksoft.com>

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




view thread (12+ messages)  latest in thread

Message-ID: <448463DC.8030306@dunslane.net>
Permalink:  ../448463DC.8030306@dunslane.net/
Also on:    postgresql.org/message-id/448463DC.8030306@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andrew@dunslane.net, pgsql@mohawksoft.com, tgl@sss.pgh.pa.us, jnasby@pervasive.com, zboszor@dunaweb.hu, pgsql-hackers@postgresql.org
  Subject: Re: [PERFORM] psql -A (unaligned format) eats too much
  In-Reply-To: <448463DC.8030306@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox