Re: Not clear on what PQgetResult does

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: David Rysdam <drysdam(at)ll(dot)mit(dot)edu>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Not clear on what PQgetResult does
Date: 2005-11-22 22:33:18
Message-ID: 200511222233.jAMMXI925739@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Alvaro Herrera wrote:
> 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.

Right, this is the standard way.

> > 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.

That thread has already been condensed into a TODO entry.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Edoardo Innocenti 2005-11-24 11:07:01 ERROR CONNECTION POSTGRES 8.1
Previous Message Bruce Momjian 2005-11-22 22:32:37 Re: Not clear on what PQgetResult does