Thread: Can I determine the server name from PGresult?

Can I determine the server name from PGresult?

From
reina_ga@hotmail.com (Tony Reina)
Date:
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