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 df462382889b951050e5044b7192df62
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: aixssd!darrenk@abs.net (Darren King)
Date:
Subject: Re: [HACKERS] Problem with copying abstimes
Next
From: The Hermit Hacker
Date:
Subject: date format: Canada same as European or US?