~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/declare.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!--
2
 
$PostgreSQL: pgsql/doc/src/sgml/ref/declare.sgml,v 1.46 2009/04/10 17:56:21 tgl Exp $
 
2
$PostgreSQL: pgsql/doc/src/sgml/ref/declare.sgml,v 1.47 2009/06/10 19:21:37 tgl Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
 
228
228
    <literal>SCROLL</literal> may not be specified in this case.
229
229
   </para>
230
230
 
 
231
   <caution>
 
232
    <para>
 
233
     Scrollable and <literal>WITH HOLD</literal> cursors may give unexpected
 
234
     results if they invoke any volatile functions (see <xref
 
235
     linkend="xfunc-volatility">).  When a previously fetched row is
 
236
     re-fetched, the functions might be re-executed, perhaps leading to
 
237
     results different from the first time.  One workaround for such cases
 
238
     is to declare the cursor <literal>WITH HOLD</literal> and commit the
 
239
     transaction before reading any rows from it.  This will force the
 
240
     entire output of the cursor to be materialized in temporary storage,
 
241
     so that volatile functions are executed exactly once for each row.
 
242
    </para>
 
243
   </caution>
 
244
 
231
245
   <para>
232
246
    If the cursor's query includes <literal>FOR UPDATE</> or <literal>FOR
233
247
    SHARE</>, then returned rows are locked at the time they are first