PGGETCONNECTIONID(n)

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

πŸ’– PgGetConnectionId() πŸ’–

okay so this is the glow-up page for PgGetConnectionId() from the PostgreSQL Tcl Interface Documentation β€” bestie, it's giving C function with main-character energy πŸ’…βœ¨

βœ… NAME βœ…

PgGetConnectionId β€” provides access to the underlying libpq SQL connection handle. no cap, that's the whole gig 🫢

✨ SYNOPSIS ✨

extern PGconn *PgGetConnectionId(Tcl_Interp *interp, const char *handle, Pg_ConnectionId **connid);

πŸ¦‹ DESCRIPTION πŸ¦‹

PgGetConnectionId returns the underlying PGconn handle. it's literally here so Tcl extensions to Pgtcl can use the existing database connection β€” reuse the connection you already have, slay πŸ’–

the Pg_ConnectionId structure provides access to more internals of the Pgtcl handle, but honestly it may be ignored in most cases. lowkey optional in your brain, but the pointer param still has rules (see below) πŸ”₯

πŸŽ€ PARAMETERS πŸŽ€

  • Tcl_Interp *interp β€” pointer to the Tcl interpreter.
  • char *handle β€” the name of the Pgtcl database handle command.
  • Pg_ConnectionId **connid β€” pointer to the address that holds the Pgtcl connection handle. it must be provided even if you don't use it, bestie β€” no skipping πŸ™ˆ

πŸ‘‘ RETURNS πŸ‘‘

PGconn *conn is a pointer to the libpq SQL database connection. periodt. πŸ’…


tiny cute sign-off: this page is from the PostgreSQL Tcl Interface Documentation source/version vibes, dated 17 September 2020. byeee, go treat your PGconn right πŸŒˆπŸ’–

πŸ“¦ where this page comes from