I've started using PQsetSingleRowMode
to be able to have more control over the data as it is streaming after PQsendQueryParams
. You need to call PQgetResult
a lot more, but is it as a matter of fact guaranteed that you'll get a single record each time, and thus PQntuples
returns 1?
I'm asking because I'm not sure if it's 100% safe to drop the code that checks for PQntuples
and loops that many times. Also I would not mind if it were greater than 1. Or if there were a separate “fire hose mode” where you get any records that have been fully transferred over the network since the previous PQgetresult
...