These functions can be used to interrogate the status of an existing database connection object.
libpq application programmers should be careful to maintain the PGconn
abstraction. Use the accessor functions described below to get at the contents of PGconn
. Reference to internal PGconn
fields using libpq-int.h
is not recommended because they are subject to change in the future.
The following functions return parameter values established at connection. These values are fixed for the life of the connection. If a multi-host connection string is used, the values of PQhost
, PQport
, and PQpass
can change if a new connection is established using the same PGconn
object. Other values are fixed for the lifetime of the PGconn
object.