Re[2]: [HACKERS] libpq: why we need to fetch all rows? - Mailing list pgsql-hackers

From Leo Shuster
Subject Re[2]: [HACKERS] libpq: why we need to fetch all rows?
Date
Msg-id 9193f8ce21e3fa4de192bc0c0845a0e1
Whole thread Raw
List pgsql-hackers
>OK, can you run a test?  If you start a transaction, declare a cursor,
>and do a fetch over and over again, does it return one line at a time
>from the server.  I think it does.
>
>Now, it will not return from the first fetch until the query has
>finished executing, but I don't think it will send all the results to
>the client, only one at a time.
    When you declare a cursor, the results ARE sent down to the client.
    The fetch just iterates over the received result set.  No savings
    are achieved through this technique.  It would be nice if the fetch
    did return ther result sets one at a time, but that problem has
    the same issues as returning each row one by one.

Leo

------------------------------

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re[2]: [HACKERS] libpq: why we need to fetch all rows?
Next
From: ycourties@internet.ubisoft.fr (Yann Courties)
Date:
Subject: [HACKERS] problems with Large Object greater than 2047 bytes !