| PostgreSQL Tcl Interface Documentation | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Fast Forward | Next | |
pg_dbinfo returns data about the connection. The first argument is a command, and the second and third argument depend on the command chosen.
commandconnectionsReturn a list of connection handles.
results connHandleReturn a list of result handles for the named connection.
version connHandleReturn server version for the connection.
protocol connHandleReturn protocol version for the connection.
param connHandle nameReturn connection's value for the named parameter.
backendpid connHandleReturn server process ID for the connection.
socket connHandleReturn socket file handle for the connection.
sql_count connHandleReturn number of SQL queries that have been made for the connection.
dbname connHandleReturn name of the connected database.
user connHandleReturn logged in user name.
password connHandleReturn logged in user's password.
host connHandleReturn address of the connected host.
port connHandleReturn host port for the connection.
options connHandleReturn command line options passed in the connection request.
status connHandleReturn connection status.
transaction_status connHandleReturn transaction status.
error_message connHandleReturn the most recent error message on the connection.
needs_password connHandleReturn true if the connection required a password but none was available.
This function can be applied after a failed connection attempt to decide whether to prompt the user for a password.
used_password connHandleReturn true if the connection used a password.
This function can be applied after either a failed or successful connection attempt to detect whether the server demanded a password.
used_ssl connHandleReturn true if the connection uses SSL.
connThe handle of the connection, when required.
paramThe connection parameter name, when the command "param" is provided.