Skip site navigation (1) Skip section navigation (2)

Re: Not clear on what PQgetResult does

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: David Rysdam <drysdam(at)ll(dot)mit(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Not clear on what PQgetResult does
Date: 2005-11-17 21:16:35
Message-ID: 20051117211635.GD10976@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-interfaces
David Rysdam wrote:
> Joshua D. Drake wrote:
> 
> >>>It isn't.  You can use it in an asynchronous client, but the way you do
> >>>that is by not calling it until PQisBusy says you can (which means the
> >>>whole result has arrived, and you're just calling PQgetResult to get
> >>>hold of it).
> >>>
> >>So there's no way to have libpq return partial results before they 
> >>are all ready?
> >>
> >>If I may, I would like to express some degree of incredulity.  Even 
> >>the version of Sybase I'm using does this right and it's from 1997!
> >
> >I am sure we would welcome a patch ;))
> 
> To be honest, this is almost enough to drive me away from PG.

If you are in need of partial results you may as well use a cursor and
fetch from it, a bunch at a time.


> Or are there underlying server reasons why this won't work?

This topic was discussed four days ago I think ... look for a thread
with subject "Incremental results from libpq" on the archives of this
list.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 2005-11-17 21:39:24
Subject: Re: Not clear on what PQgetResult does
Previous:From: David RysdamDate: 2005-11-17 20:42:54
Subject: Re: Not clear on what PQgetResult does

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group