Re: pg_select Equivalent in libpq - Mailing list pgsql-interfaces

From Christof Petig
Subject Re: pg_select Equivalent in libpq
Date
Msg-id 3BA769C6.AF61644F@petig-baender.de
Whole thread Raw
In response to pg_select Equivalent in libpq  (Ecmel Ercan <ecmel@linux-turkey.com>)
Responses Re: pg_select Equivalent in libpq  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
Ecmel Ercan wrote:

> At some point, I need to process each tuple returned by the PQexec
> SELECT query as soon as it is received.  (Actually I like to insert them
> in a table widget).
>
> But when I execute PQExec, all the SELECT result is fetched first.  I
> have a very big table so I need to insert each row as soon as they are
> fetched from the server.
>
> The pg_select function does this but it is in TCL library.
>
> How can I achive the same result in libpq?

I would recommend a cursor. But I don't know how to do that in pq (only
with ecpg)

Christof




pgsql-interfaces by date:

Previous
From: Ecmel Ercan
Date:
Subject: pg_select Equivalent in libpq
Next
From: Michael Meskes
Date:
Subject: Re: pg_select Equivalent in libpq