Re: [HACKERS] migration to v6.5 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] migration to v6.5
Date
Msg-id 7419.932065797@sss.pgh.pa.us
Whole thread Raw
In response to migration to v6.5  (Michael J Schout <mschout@mail.gkg-com.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: #include removal
Next
From: Ole Gjerde
Date:
Subject: Interesting index/LIKE/join slowness problems