How to discard partially retrieved result set with the C API?

From: 邓尧 <torshie(at)gmail(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: How to discard partially retrieved result set with the C API?
Date: 2014-02-18 09:44:10
Message-ID: CAOb3iujbTXqKPp8o4q7tQr-rPnS_QJvEONqDT_Z28=nAbSsVgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When single row mode is enabled, after retrieving part of the result set,
I'm no longer interested in the rest of it (due to error handling or other
reasons). How can I discard the result set without repeatedly calling
PQgetResult() in such situation ?
The result set may be quite large and it's inefficient to call
PQgetResult() repeatedly, so it's necessary to do so sometimes.

Thanks
Yao

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dmitriy Igrishin 2014-02-18 10:53:39 Re: How to discard partially retrieved result set with the C API?
Previous Message Vincent de Phily 2014-02-18 08:43:23 Re: Deleted files still open long after droping a database