PG_DBINFO(n)
π NAME π
pg_dbinfo β returns data about the connection. that's it, that's the vibe πΈ
okay bestie, this is the PostgreSQL Tcl Interface Documentation page for pg_dbinfo, and it's literally here to hand you connection data. slay π
β¨ SYNOPSIS β¨
pg_dbinfo command ?conn? ?paramname?
π¦ DESCRIPTION π¦
okay so pg_dbinfo returns data about the connection. the first argument is a command, and the second and third argument depend on the command chosen. no cap, it's giving little query gremlin in the best way π
π ARGUMENTS π
commandβ the main character arg. it decides what the second and third arguments mean. here's the whole menu:connectionsβ returns a list of connection handles.results connHandleβ returns a list of result handles for the named connection.version connHandleβ returns server version for the connection.protocol connHandleβ returns protocol version for the connection.param connHandle nameβ returns connection's value for the named parameter.backendpid connHandleβ returns server process ID for the connection.socket connHandleβ returns socket file handle for the connection.sql_count connHandleβ returns number of SQL queries that have been made for the connection.dbname connHandleβ returns name of the connected database.user connHandleβ returns logged in user name.password connHandleβ returns logged in user's password.host connHandleβ returns address of the connected host.port connHandleβ returns host port for the connection.options connHandleβ returns command line options passed in the connection request.status connHandleβ returns connection status.transaction_status connHandleβ returns transaction status.error_message connHandleβ returns the most recent error message on the connection.needs_password connHandleβ returns 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 connHandleβ returns 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 connHandleβ returns true if the connection uses SSL.
connβ the handle of the connection, when required.paramβ the connection parameter name, when the commandparamis provided.
π RETURN VALUE π
the return value is a Tcl list of connection handle names β¨
signed off with PostgreSQL Tcl Interface Documentation energy, dated 17 September 2020 π«Άπ
π¦ where this page comes from
- alpine 3.22: pgtcl-doc 3.1.0-r0 Β· BSD-3-Clause
- alpine 3.23: pgtcl-doc 3.1.1-r0 Β· BSD-3-Clause
- alpine 3.24: pgtcl-doc 3.1.1-r0 Β· BSD-3-Clause
- nixpkgs unstable: pgtcl 3.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms