.\" This manpage has been automatically generated by docbook2man 
.\" from a DocBook document.  This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "PG_ON_CONNECTION_LOSS" "" "17 September 2020" "" "PostgreSQL Tcl Interface Documentation"

.SH NAME
pg_on_connection_loss \- set or change a callback for unexpected connection loss

.SH SYNOPSIS

.nf
pg_on_connection_loss \fIconn\fR [\fIcallbackCommand\fR]
.fi
.SH "DESCRIPTION"
.PP
\fBpg_on_connection_loss\fR creates, changes, or
cancels a request to execute a callback command if an unexpected
loss of connection to the database occurs.  With a
\fIcallbackCommand\fR parameter, the request is
established, or the command string of an already existing request
is replaced.  With no \fIcallbackCommand\fR parameter, a
prior request is canceled.
.PP
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 \fBupdate\fR
or \fBvwait\fR to cause the idle loop to be entered.
.SH "ARGUMENTS"
.TP
\fB\fIconn\fB\fR
The handle to watch for connection losses.
.TP
\fB\fIcallbackCommand\fB\fR
If present, provides the command string to execute when
connection loss is detected.
.SH "RETURN VALUE"
.PP
None
