migration to v6.5 - Mailing list pgsql-hackers

From Michael J Schout
Subject migration to v6.5
Date
Msg-id 199907151740.MAA07567@mail.gkg-com.com
Whole thread Raw
Responses Re: [HACKERS] migration to v6.5
List pgsql-hackers
Hi.

Ive recently looked into porting an internal tool our company uses to
version 6.5 of postgresql (from 6.4.2).  Unfortunately, the original author
of this tool used items like:

PGresult *res;
...
myconn = res->conn;

in a few spots (usually to be used to query pg_type to get string typename
for come columns of the result set).  Looking through the libpq headers, it
does appear that the PGconn member of the struct is still there, but the
struct definition (struct pg_result) has been hidden from applications via
moving the struct definitions to a nother file.

I realize that using code like the above is a BadThing(tm), and if I were
writing the application, I would not have done it that way.  However, if I
am going to port this application to v6.5, it will require some workaround.
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.

Thanks for all the hard work guys.  

Regards,
Mike



pgsql-hackers by date:

Previous
From: "Burgess, Trevor - HMS"
Date:
Subject: Locking
Next
From: Evan Klinger
Date:
Subject: SELECT using arrays