cursor interface to libpq

From: "Kirby Bohling (TRSi)" <kbohling(at)oasis(dot)novia(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: cursor interface to libpq
Date: 2000-09-19 22:59:06
Message-ID: Pine.GSO.4.21.0009191748310.22170-100000@oasis.novia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


I am trying to run a select statement, and I keep running out of
memory. I have noticed that libpq has the nice feature that I don't have
to request each row one at a time. After a little investigate, I found
that libpq appears to get the entire result set at once. Well, at least
PQgetvalue() doesn't appear to do anything besides return a pointer to a
string. There is no lazy evaluation. It doesn't just fetch the row I
need, and flush old ones as memory permits.

Is there any interface that I can link to a C/C++ program that
will allow me row at a time access to the data? Not being able to run
select statements is going to be a fairly sizeable problem for me.

This might also explain why when I attempt to dump my database, it also
fails, pg_dump seems to be based on libpq. I have shutting down my
database and just backing up the filesystem to be safe. I run in a shop
that hopes to go 24/7 sometime soon, so I need to find an answer RSN.

Thanks,
Kirby

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Vic 2000-09-20 00:19:16 Re: PHP & Large Object
Previous Message Edward Q. Bridges 2000-09-19 16:28:52 error compiling plperl