Debian Codegraph @

doc/html/pgtcl-pgon-connection-loss.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.6.0">
6 <title>pg_on_connection_loss</title>
7 <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
8 <link rev="MADE" href="mailto:[email protected]">
9 <link rel="HOME" title="PostgreSQL Tcl Interface Documentation" href="index.html">
10 <link rel="UP" title="pgtcl Command Reference" href="libpgtcl-ref.html">
11 <link rel="PREVIOUS" title="pg_listen" href="pgtcl-pglisten.html">
12 <link rel="NEXT" title="pg_sendquery" href="pgtcl-pgsendquery.html">
13 <link rel="STYLESHEET" type="text/css" href="stylesheet.css">
14 </head>
15 <body class="REFENTRY">
16 <div class="NAVHEADER">
17 <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
18 <tr>
19 <th colspan="5" align="center" valign="bottom">PostgreSQL Tcl Interface Documentation</th>
20 </tr>
21 <tr>
22 <td width="10%" align="left" valign="top"><a href="pgtcl-pglisten.html" accesskey="P">Prev</a></td>
23 <td width="10%" align="left" valign="top"><a href="pgtcl-pglisten.html">Fast Backward</a></td>
24 <td width="60%" align="center" valign="bottom"></td>
25 <td width="10%" align="right" valign="top"><a href="pgtcl-pgsendquery.html">Fast Forward</a></td>
26 <td width="10%" align="right" valign="top"><a href="pgtcl-pgsendquery.html" accesskey="N">Next</a></td>
27 </tr>
28 </table>
29 <hr align="left" width="100%"></div>
30 <h1><a name="PGTCL-PGON-CONNECTION-LOSS" id="PGTCL-PGON-CONNECTION-LOSS"></a>pg_on_connection_loss</h1>
31 <div class="REFNAMEDIV"><a name="AEN1456" id="AEN1456"></a>
32 <h2>Name</h2>
33 pg_on_connection_loss&nbsp;--&nbsp;set or change a callback for unexpected connection loss<a name="IX-PGTCL-PGON-CONNECTION-LOSS-2" id="IX-PGTCL-PGON-CONNECTION-LOSS-2"></a></div>
34 <div class="REFSYNOPSISDIV"><a name="AEN1461" id="AEN1461"></a>
35 <h2>Synopsis</h2>
36 <pre class="SYNOPSIS">pg_on_connection_loss <code class="PARAMETER">conn</code> ?<span class="OPTIONAL"><code class="PARAMETER">callbackCommand</code></span>?</pre></div>
37 <div class="REFSECT1"><a name="AEN1466" id="AEN1466"></a>
38 <h2>Description</h2>
39 <p><code class="FUNCTION">pg_on_connection_loss</code> creates, changes, or cancels a request to execute a callback command if an unexpected loss of connection to the database occurs. With a <code class="PARAMETER">callbackCommand</code> parameter, the request is established, or the command string of an already existing request is replaced. With no <code class="PARAMETER">callbackCommand</code> parameter, a prior request is canceled.</p>
40 <p>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 <code class="FUNCTION">update</code> or <code class="FUNCTION">vwait</code> to cause the idle loop to be entered.</p>
41 </div>
42 <div class="REFSECT1"><a name="AEN1475" id="AEN1475"></a>
43 <h2>Arguments</h2>
44 <div class="VARIABLELIST">
45 <dl>
46 <dt><code class="PARAMETER">conn</code></dt>
47 <dd>
48 <p>The handle to watch for connection losses.</p>
49 </dd>
50 <dt><code class="PARAMETER">callbackCommand</code></dt>
51 <dd>
52 <p>If present, provides the command string to execute when connection loss is detected.</p>
53 </dd>
54 </dl>
55 </div>
56 </div>
57 <div class="REFSECT1"><a name="AEN1488" id="AEN1488"></a>
58 <h2>Return Value</h2>
59 <p>None</p>
60 </div>
61 <div class="NAVFOOTER">
62 <hr align="left" width="100%">
63 <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
64 <tr>
65 <td width="33%" align="left" valign="top"><a href="pgtcl-pglisten.html" accesskey="P">Prev</a></td>
66 <td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td>
67 <td width="33%" align="right" valign="top"><a href="pgtcl-pgsendquery.html" accesskey="N">Next</a></td>
68 </tr>
69 <tr>
70 <td width="33%" align="left" valign="top">pg_listen</td>
71 <td width="34%" align="center" valign="top"><a href="libpgtcl-ref.html" accesskey="U">Up</a></td>
72 <td width="33%" align="right" valign="top">pg_sendquery</td>
73 </tr>
74 </table>
75 </div>
76 </body>
77 </html>