PG_ON_CONNECTION_LOSS(n)
π pg_on_connection_loss π
π NAME π
okay so bestie, pg_on_connection_loss β set or change a callback for unexpected connection loss. This page comes straight from the PostgreSQL Tcl Interface Documentation, and it's here to help you handle that "wait, where did the database go?" moment with main character energy. π
β¨ SYNOPSIS β¨
pg_on_connection_loss conn [callbackCommand]
π DESCRIPTION π
pg_on_connection_loss creates, changes, or cancels a request to execute a callback command if an unexpected loss of connection to the database occurs. The way it works is lowkey simple:
- With a
callbackCommandparameter, the request is established, or the command string of an already existing request is replaced. Slay. β¨ - With no
callbackCommandparameter, a prior request is canceled. Bye bestie. π
The callback command string is executed from the Tcl idle loop. That is the normal idle state of an application written with Tk. In non-Tk Tcl shells, you can execute update or vwait to cause the idle loop to be entered. iykyk π«Ά
π¦ ARGUMENTS π¦
connβ the handle to watch for connection losses. πcallbackCommandβ if present, provides the command string to execute when connection loss is detected. π
πΈ RETURN VALUE πΈ
None. That's it. Nothing returned. periodt. π
π«Ά signed, sealed, delivered: this page is from the PostgreSQL Tcl Interface Documentation, dated 17 September 2020. no cap. π
π¦ 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