Stephen Frost <sfrost(at)snowman(dot)net> writes:
> ... If libpq grabs the entire result in one go then that may
> actually cause a problem for me when I start to move things from Oracle
> to postgres since the clients don't always have much memory available.
It does that in an ordinary SELECT. The customary answer to this has
been "use a cursor and FETCH the number of rows you want to process at
a time".
regards, tom lane