Can I determine the server name from PGresult?

From: reina_ga(at)hotmail(dot)com (Tony Reina)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Can I determine the server name from PGresult?
Date: 2004-07-23 18:52:14
Message-ID: 272e4be7.0407231052.d7642c7@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-23 19:20:44 Re: ffunc called multiple for same value
Previous Message David Fetter 2004-07-23 18:51:46 Re: [HACKERS] Tutorial