Tom Lane wrote:
> With the fix I just committed, current sources execute the above query
> in constant backend memory space. psql's space usage still goes to the
> moon, of course, since it's trying to buffer the whole query result :-(
> ... but there's no way around that short of a major redesign of libpq's
> API. When and if we switch over to CORBA, we really need to rethink
> the client access API so that buffering the query result in the client-
> side library is an option not a requirement.
What about portals? Doesn't psql use portals?