PG_DBINFO(n)

πŸ“¦ version 3.1.1, in alpine 3.22, alpine 3.23, alpine 3.24, nixpkgs unstable

πŸ’– 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 command param is 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