Re: Problem: libpq, network traffic, memory usage - Mailing list pgsql-general

From Volkan YAZICI
Subject Re: Problem: libpq, network traffic, memory usage
Date
Msg-id 20051207181238.GA21856@alamut
Whole thread Raw
In response to Re: Problem: libpq, network traffic, memory usage  (Alexander Scholz <alexander.scholz1@freenet.de>)
List pgsql-general
On Dec 07 06:56, Alexander Scholz wrote:
> I SELECTed them, that's right, but I didn't FETCHed them. I thought that
> would be a difference. It's at least the way it works with MSSQL and
> ODBC/OLEDB (that's where I am coming from...)

IMHO, you can reach to a similar functionaly with using asynchronous query
functions. For instance:

PQsendQuery();  /* First of all, send related query. */
for (...)       /* In an appropriate loop */
{
                /* ... gather results gradually from socket. */
}
PQgetResult();  /* Form final PGresult object. */

But beware that, above method will not supply results gradually in a usable
form. You'll collect data read from socket and form a PGresult struct using
'em. After that, you can use that PGresult object.


Regards.

--
"We are the middle children of history, raised by television to believe
that someday we'll be millionaires and movie stars and rock stars, but
we won't. And we're just learning this fact," Tyler said. "So don't
fuck with us."

pgsql-general by date:

Previous
From: Alexander Scholz
Date:
Subject: Re: [pgsql-de-allgemein] Query SELECT * sehr langsam
Next
From: Mike Rylander
Date:
Subject: Re: fts, compond words?