This file is indexed.

/usr/share/doc/python3-postgresql/html/notifyman.html is in python3-postgresql 1.1.0-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Notification Management &mdash; py-postgresql 1.1.0 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="py-postgresql 1.1.0 documentation" href="index.html" />
    <link rel="next" title="Advisory Locks" href="alock.html" />
    <link rel="prev" title="Copy Management" href="copyman.html" />
 
<link rel="stylesheet" href="_static/unsuck.css" type="text/css" />

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="alock.html" title="Advisory Locks"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="copyman.html" title="Copy Management"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">py-postgresql 1.1.0 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="notification-management">
<span id="notifyman"></span><h1>Notification Management<a class="headerlink" href="#notification-management" title="Permalink to this headline"></a></h1>
<p>Relevant SQL commands: <a class="reference external" href="http://postgresql.org/docs/current/static/sql-notify.html">NOTIFY</a>,
<a class="reference external" href="http://postgresql.org/docs/current/static/sql-listen.html">LISTEN</a>,
<a class="reference external" href="http://postgresql.org/docs/current/static/sql-unlisten.html">UNLISTEN</a>.</p>
<p>Asynchronous notifications offer a means for PostgreSQL to signal application
code. Often these notifications are used to signal cache invalidation. In 9.0
and greater, notifications may include a &#8220;payload&#8221; in which arbitrary data may
be delivered on a channel being listened to.</p>
<p>By default, received notifications will merely be appended to an internal
list on the connection object. This list will remain empty for the duration
of a connection <em>unless</em> the connection begins listening to a channel that
receives notifications.</p>
<p>The <cite>postgresql.notifyman.NotificationManager</cite> class is used to wait for
messages to come in on a set of connections, pick up the messages, and deliver
the messages to the object&#8217;s user via the <cite>collections.Iterator</cite> protocol.</p>
<div class="section" id="listening-on-a-single-connection">
<h2>Listening on a Single Connection<a class="headerlink" href="#listening-on-a-single-connection" title="Permalink to this headline"></a></h2>
<p>The <tt class="docutils literal"><span class="pre">db.iternotifies()</span></tt> method is a simplification of the notification manager. It
returns an iterator to the notifications received on the subject connection.
The iterator yields triples consisting of the <tt class="docutils literal"><span class="pre">channel</span></tt> being
notified, the <tt class="docutils literal"><span class="pre">payload</span></tt> sent with the notification, and the <tt class="docutils literal"><span class="pre">pid</span></tt> of the
backend that caused the notification:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">db</span><span class="o">.</span><span class="n">listen</span><span class="p">(</span><span class="s">&#39;for_rabbits&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">db</span><span class="o">.</span><span class="n">notify</span><span class="p">(</span><span class="s">&#39;for_rabbits&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">db</span><span class="o">.</span><span class="n">iternotifies</span><span class="p">():</span>
<span class="gp">... </span> <span class="n">channel</span><span class="p">,</span> <span class="n">payload</span><span class="p">,</span> <span class="n">pid</span> <span class="o">=</span> <span class="n">x</span>
<span class="gp">... </span> <span class="k">break</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">assert</span> <span class="n">channel</span> <span class="o">==</span> <span class="s">&#39;for_rabbits&#39;</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">assert</span> <span class="n">payload</span> <span class="o">==</span> <span class="s">&#39;&#39;</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">assert</span> <span class="n">pid</span> <span class="o">==</span> <span class="n">db</span><span class="o">.</span><span class="n">backend_id</span>
<span class="go">True</span>
</pre></div>
</div>
<p>The iterator, by default, will continue listening forever unless the connection
is terminated&#8211;thus the immediate <tt class="docutils literal"><span class="pre">break</span></tt> statement in the above loop. In
cases where some additional activity is necessary, a timeout parameter may be
given to the <tt class="docutils literal"><span class="pre">iternotifies</span></tt> method in order to allow &#8220;idle&#8221; events to occur
at the designated frequency:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">db</span><span class="o">.</span><span class="n">iternotifies</span><span class="p">(</span><span class="mf">0.5</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
<span class="gp">... </span>  <span class="k">break</span>
</pre></div>
</div>
<p>The above example illustrates that idle events are represented using <cite>None</cite>
objects. Idle events are guaranteed to occur <em>approximately</em> at the
specified interval&#8211;the <tt class="docutils literal"><span class="pre">timeout</span></tt> keyword parameter. In addition to
providing a means to do other processing or polling, they also offer a safe
break point for the loop. Internally, the iterator produced by the
<tt class="docutils literal"><span class="pre">iternotifies</span></tt> method <em>is</em> a <cite>NotificationManager</cite>, which will localize the
notifications prior to emitting them via the iterator.
<em>It&#8217;s not safe to break out of the loop, unless an idle event is being handled.</em>
If the loop is broken while a regular event is being processed, some events may
remain in the iterator. In order to consume those events, the iterator <em>must</em>
be accessible.</p>
<p>The iterator will be exhausted when the connection is closed, but if the
connection is closed during the loop, any remaining notifications <em>will</em>
be emitted prior to the loop ending, so it is important to be prepared to
handle exceptions or check for a closed connection.</p>
<p>In situations where multiple connections need to be watched, direct use of the
<cite>NotificationManager</cite> is necessary.</p>
</div>
<div class="section" id="listening-on-multiple-connections">
<h2>Listening on Multiple Connections<a class="headerlink" href="#listening-on-multiple-connections" title="Permalink to this headline"></a></h2>
<p>The <cite>postgresql.notifyman.NotificationManager</cite> class is used to manage
<em>connections</em> that are expecting to receive notifications. Instances are
iterators that yield the connection object and notifications received on the
connection or <cite>None</cite> in the case of an idle event. The manager emits events as
a pair; the connection object that received notifications, and <em>all</em> the
notifications picked up on that connection:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">postgresql.notifyman</span> <span class="kn">import</span> <span class="n">NotificationManager</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Using ``nm`` to reference the manager from here on.</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nm</span> <span class="o">=</span> <span class="n">NotificationManager</span><span class="p">(</span><span class="n">db1</span><span class="p">,</span> <span class="n">db2</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="n">dbN</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nm</span><span class="o">.</span><span class="n">settimeout</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">nm</span><span class="p">:</span>
<span class="gp">... </span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
<span class="gp">... </span>  <span class="c"># idle</span>
<span class="gp">... </span>  <span class="k">break</span>
<span class="gp">...</span>
<span class="gp">... </span> <span class="n">db</span><span class="p">,</span> <span class="n">notifies</span> <span class="o">=</span> <span class="n">x</span>
<span class="gp">... </span> <span class="k">for</span> <span class="n">channel</span><span class="p">,</span> <span class="n">payload</span><span class="p">,</span> <span class="n">pid</span> <span class="ow">in</span> <span class="n">notifies</span><span class="p">:</span>
<span class="gp">... </span>  <span class="o">...</span>
</pre></div>
</div>
<p>The manager will continue to wait for and emit events so long as there are
good connections available in the set; it is possible for connections to be
added and removed at any time. Although, in rare circumstances, discarded
connections may still have pending events if it not removed during an idle
event. The <tt class="docutils literal"><span class="pre">connections</span></tt> attribute on <cite>NotificationManager</cite> objects is a
set object that may be used directly in order to add and remove connections
from the manager:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">y</span> <span class="o">=</span> <span class="p">[]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">nm</span><span class="p">:</span>
<span class="gp">... </span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
<span class="gp">... </span>  <span class="k">if</span> <span class="n">y</span><span class="p">:</span>
<span class="gp">... </span>   <span class="n">nm</span><span class="o">.</span><span class="n">connections</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="gp">... </span>   <span class="k">del</span> <span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="gp">...</span>
</pre></div>
</div>
<p>The notification manager is resilient; if a connection dies, it will discard the
connection from the set, and add it to the set of bad connections, the
<tt class="docutils literal"><span class="pre">garbage</span></tt> attribute. In these cases, the idle event <em>should</em> be leveraged to
check for these failures if that&#8217;s a concern. It is the user&#8217;s
responsibility to explicitly handle the failure cases, and remove the bad
connections from the <tt class="docutils literal"><span class="pre">garbage</span></tt> set:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">nm</span><span class="p">:</span>
<span class="gp">... </span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
<span class="gp">... </span>  <span class="k">if</span> <span class="n">nm</span><span class="o">.</span><span class="n">garbage</span><span class="p">:</span>
<span class="gp">... </span>   <span class="n">recovered</span> <span class="o">=</span> <span class="n">take_out_trash</span><span class="p">(</span><span class="n">nm</span><span class="o">.</span><span class="n">garbage</span><span class="p">)</span>
<span class="gp">... </span>   <span class="n">nm</span><span class="o">.</span><span class="n">connections</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">recovered</span><span class="p">)</span>
<span class="gp">... </span>   <span class="n">nm</span><span class="o">.</span><span class="n">garbage</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
<span class="gp">... </span> <span class="n">db</span><span class="p">,</span> <span class="n">notifies</span> <span class="o">=</span> <span class="n">x</span>
<span class="gp">... </span> <span class="k">for</span> <span class="n">channel</span><span class="p">,</span> <span class="n">payload</span><span class="p">,</span> <span class="n">pid</span> <span class="ow">in</span> <span class="n">notifies</span><span class="p">:</span>
<span class="gp">... </span>  <span class="o">...</span>
</pre></div>
</div>
<p>Explicitly removing connections from the set can also be a means to gracefully
terminate the event loop:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">nm</span><span class="p">:</span>
<span class="gp">... </span> <span class="k">if</span> <span class="n">x</span> <span class="ow">in</span> <span class="bp">None</span><span class="p">:</span>
<span class="gp">... </span>  <span class="k">if</span> <span class="n">done_listening</span> <span class="ow">is</span> <span class="bp">True</span><span class="p">:</span>
<span class="gp">... </span>   <span class="n">nm</span><span class="o">.</span><span class="n">connections</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
</pre></div>
</div>
<p>However, doing so inside the loop is not a requirement; it is safe to remove a
connection from the set at any point.</p>
</div>
<div class="section" id="notification-managers">
<h2>Notification Managers<a class="headerlink" href="#notification-managers" title="Permalink to this headline"></a></h2>
<p>The <cite>postgresql.notifyman.NotificationManager</cite> is an event loop that services
multiple connections. In cases where only one connection needs to be serviced,
the <cite>postgresql.api.Database.iternotifies</cite> method can be used to simplify the
process.</p>
<div class="section" id="notification-manager-constructors">
<h3>Notification Manager Constructors<a class="headerlink" href="#notification-manager-constructors" title="Permalink to this headline"></a></h3>
<blockquote>
<div><dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">NotificationManager(*connections,</span> <span class="pre">timeout</span> <span class="pre">=</span> <span class="pre">None)</span></tt></dt>
<dd>Create a NotificationManager instance that manages the notifications coming
from the given set of connections. The <tt class="docutils literal"><span class="pre">timeout</span></tt> keyword is optional and
can be configured using the <tt class="docutils literal"><span class="pre">settimeout</span></tt> method as well.</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="notification-manager-interface-points">
<h3>Notification Manager Interface Points<a class="headerlink" href="#notification-manager-interface-points" title="Permalink to this headline"></a></h3>
<blockquote>
<div><dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">NotificationManager.__iter__()</span></tt></dt>
<dd>Returns the instance; it is an iterator.</dd>
<dt><tt class="docutils literal"><span class="pre">NotificationManager.__next__()</span></tt></dt>
<dd>Normally, yield the pair, connection and notifications list, when the next
event is received. If a timeout is configured, <cite>None</cite> may be yielded to signal
an idle event. The notifications list is a list of triples:
<tt class="docutils literal"><span class="pre">(channel,</span> <span class="pre">payload,</span> <span class="pre">pid)</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">NotificationManager.settimeout(timeout</span> <span class="pre">:</span> <span class="pre">int)</span></tt></dt>
<dd>Set the amount of time to wait before the manager yields an idle event.
If zero, the manager will never wait and only yield notifications that are
immediately available.
If <cite>None</cite>, the manager will never emit idle events.</dd>
<dt><tt class="docutils literal"><span class="pre">NotificationManager.gettimeout()</span> <span class="pre">-&gt;</span> <span class="pre">[int,</span> <span class="pre">None]</span></tt></dt>
<dd>Get the configured timeout; returns either <cite>None</cite>, or an <cite>int</cite>.</dd>
<dt><tt class="docutils literal"><span class="pre">NotificationManager.connections</span></tt></dt>
<dd>The set of connections that the manager is actively watching for
notifications. Connections may be added or removed from the set at any time.</dd>
<dt><tt class="docutils literal"><span class="pre">NotificationManager.garbage</span></tt></dt>
<dd>The set of connections that failed. Normally empty, but when a connection gets
an exceptional condition or explicitly raises an exception, it is removed from
the <tt class="docutils literal"><span class="pre">connections</span></tt> set, and placed in <tt class="docutils literal"><span class="pre">garbage</span></tt>.</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="zero-timeout">
<h3>Zero Timeout<a class="headerlink" href="#zero-timeout" title="Permalink to this headline"></a></h3>
<p>When a timeout of zero, <tt class="docutils literal"><span class="pre">0</span></tt>, is configured, the notification manager will
terminate early. Specifically, each connection will be polled for any pending
notifications, and once all of the collected notifications have been emitted
by the iterator, <cite>StopIteration</cite> will be raised. Notably, <em>no</em> idle events will
occur when the timeout is configured to zero.</p>
<p>Zero timeouts offer a means for the notification &#8220;queue&#8221; to be polled. Often,
this is the appropriate way to collect pending notifications on active
connections where using the connection exclusively for waiting is not
practical:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">notifies</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">db</span><span class="o">.</span><span class="n">iternotifies</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span>
</pre></div>
</div>
<p>Or with a NotificationManager instance:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">nm</span><span class="o">.</span><span class="n">settimeout</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">db_notifies</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">nm</span><span class="p">)</span>
</pre></div>
</div>
<p>In both cases of zero timeout, the iterator may be promptly discarded without
losing any events.</p>
</div>
<div class="section" id="summary-of-characteristics">
<h3>Summary of Characteristics<a class="headerlink" href="#summary-of-characteristics" title="Permalink to this headline"></a></h3>
<blockquote>
<div><ul class="simple">
<li>The iterator will continue until the connections die.</li>
<li>Objects yielded by the iterator are either <cite>None</cite>, an &#8220;idle event&#8221;, or an
individual notification triple if using <tt class="docutils literal"><span class="pre">db.iternotifies()</span></tt>, or a
<tt class="docutils literal"><span class="pre">(db,</span> <span class="pre">notifies)</span></tt> pair if using the base <cite>NotificationManager</cite>.</li>
<li>When a connection dies or raises an exception, it will be removed from
the <tt class="docutils literal"><span class="pre">nm.connections</span></tt> set and added to the <tt class="docutils literal"><span class="pre">nm.garbage</span></tt> set.</li>
<li>The NotificationManager instance will <em>not</em> hold any notifications
during an idle event. Idle events offer a break point in which the manager
may be discarded.</li>
<li>A timeout of zero will cause the iterator to only yield the events
that are pending right now, and promptly end. However, the same manager
object may be used again.</li>
<li>A notification triple is a tuple consisting of <tt class="docutils literal"><span class="pre">(channel,</span> <span class="pre">payload,</span> <span class="pre">pid)</span></tt>.</li>
<li>Connections may be added and removed from the <tt class="docutils literal"><span class="pre">nm.connections</span></tt> set at
any time.</li>
</ul>
</div></blockquote>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Notification Management</a><ul>
<li><a class="reference internal" href="#listening-on-a-single-connection">Listening on a Single Connection</a></li>
<li><a class="reference internal" href="#listening-on-multiple-connections">Listening on Multiple Connections</a></li>
<li><a class="reference internal" href="#notification-managers">Notification Managers</a><ul>
<li><a class="reference internal" href="#notification-manager-constructors">Notification Manager Constructors</a></li>
<li><a class="reference internal" href="#notification-manager-interface-points">Notification Manager Interface Points</a></li>
<li><a class="reference internal" href="#zero-timeout">Zero Timeout</a></li>
<li><a class="reference internal" href="#summary-of-characteristics">Summary of Characteristics</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="copyman.html"
                        title="previous chapter">Copy Management</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="alock.html"
                        title="next chapter">Advisory Locks</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/notifyman.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="alock.html" title="Advisory Locks"
             >next</a> |</li>
        <li class="right" >
          <a href="copyman.html" title="Copy Management"
             >previous</a> |</li>
        <li><a href="index.html">py-postgresql 1.1.0 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright Python+Postgres.
      Last updated on Mar 31, 2014.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
    </div>
  </body>
</html>