On Wed, 2025-12-17 at 13:07 -0800, Igor Korot wrote: > This is a comment: > > /* > * Our test case here involves using a cursor, for which we must be inside > * a transaction block. We could do the whole thing with a single > * PQexec() of "select * from pg_database", but that's too trivial to make > * a good example. > */ > > When I read it my understanding is: > > It is possible to write the code without a cursor.. > However it will be trivial and so the code will use CURSOR. > But the usage of CURSOR is actually not required - it is used > in the docs only to make a good example. > > However, when I tried to write the code without the CURSOR > it seems that CURSOR usage is a must and not optional, which > contradicts the comment above. > > I hope now my question is clear. I want to know if using CURSR > is a must.
Sorry that it took me so long to understand what you mean. Your PQexec call should return all rows. If you don't get all rows, there must be some other problem with your code. You didn't show enough of the code for me to see where the problem is. Yours, Laurenz Albe
