Can I determine the server name from PGresult? - Mailing list pgsql-hackers

From reina_ga@hotmail.com (Tony Reina)
Subject Can I determine the server name from PGresult?
Date
Msg-id 272e4be7.0407231052.d7642c7@posting.google.com
Whole thread Raw
List pgsql-hackers
I have some libraries that serve as libpq wrappers. One function has
the PGresult structure pointer passed to it. I'd like to be able to
determine the host name from within the function, but I don't have the
PGconn pointer to use PQhost().

Is there any workaround to this? Can I somehow pass PGresult to
PQhost() or some similar function.

Way back before PG 7.0, I would have been able to link to PGconn from
within PGresult. Now it seems that the PGresult structure is
purposefully hidden from the programmer.

TIA,
-Tony


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: patch for allowing multiple -t options to pg_dump
Next
From: Tom Lane
Date:
Subject: Re: ffunc called multiple for same value