On Tue, Dec 11, 2012 at 6:59 AM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> Would it be crazy to add an "already_freed" flag to the pg_result
> struct which PQclear() would set, or some equivalent safety mechanism,
> to avoid this hassle for users?
Such mechanism already exist - you just need to set
your PGresult pointer to NULL after each PQclear().
Later you can safely call PQclear() again on that pointer.
--
marko