"Kevin Grittner" <[EMAIL PROTECTED]> writes:
> Are you saying that if I execute a statement like:
> select * from "TableWithHundredsOfMillionsOfRows"
 
> that the entire table will be copied to a result set before returning
> the first row?

libpq does things that way, yes.

> Is this result set built in RAM on the server side?

No.
 
> I am interested primarily in the behavior under JDBC, although psql is
> also significant.

JDBC does things its own way; I believe it is possible to fetch a
resultset in a streaming fashion in JDBC, but you'd have to ask them.

The point of this discussion is simply that the current libpq API does
not permit streaming resultsets.  This is not a limitation of the
server, nor of the protocol, nor even really of libpq itself if you
were willing to invent a suitable new set of API definitions for a
streaming-resultset interface.  But we aren't going to change the
existing API to do streaming behind the client's back, because it won't
be transparent.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to