Tom, > Far more useful would be some sort of streaming API to let the > application process the rows as they arrive, or at least fetch the rows > in small batches (the V3 protocol supports the latter even without any > explicit use of a cursor). I'm not sure if this can be bolted onto the > existing libpq framework reasonably, but that's the direction I'd prefer > to go in. I think that TelegraphCQ incorporates this. However, I'm not sure whether it's a portable component; it may be too tied in to their streaming query engine. They have talked about porting their "background query" patch for PSQL, though ... -- Josh Berkus Aglio Database Solutions San Francisco