Michael J Schout <mschout@mail.gkg-com.com> writes:
> My question is this: If the PGresult struct contains a PGconn member,
> should there be an accessor function for it? Or is this member considered
> to be private? If so, I guess I will have to rewrite a large section of
> this application from scratch, but I thought I would check on the reasoning
> for the move of the conn member here first.
I had intended to remove that member entirely, but desisted in order to
grant some breathing room to people in your situation ;-). For the
moment you can access it if you include libpq-int.h in your application.
The reasoning for removing it is that a PGresult could outlive the
PGconn it was produced from, leaving you with a dangling pointer.
I would like to remove it eventually, but probably won't do so for
another version or two.
regards, tom lane