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


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to