11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.22 2003/04/06 22:41:52 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.23 2003/04/29 03:21:28 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -70,8 +70,8 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
7070 <term>NO SCROLL</term>
7171 <listitem>
7272 <para>
73- Specifies that the cursor cannot be used to retrieve rows in a
74- nonsequential fashion (e.g., backward).
73+ Specifies that the cursor cannot be used to retrieve rows in a
74+ nonsequential fashion (e.g., backward).
7575 </para>
7676 </listitem>
7777 </varlistentry>
@@ -83,7 +83,7 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
8383Specifies that the cursor may be used to retrieve rows in a
8484nonsequential fashion (e.g., backward). Depending upon the
8585complexity of the query's execution plan, specifying
86- <literal>SCROLL</literal> may impose aslight performance penalty
86+ <literal>SCROLL</literal> may impose a performance penalty
8787on the query's execution time.
8888 </para>
8989 </listitem>
@@ -96,7 +96,7 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
9696 Specifies that the cursor cannot be used outside of the
9797 transaction that created it. If neither <literal>WITHOUT
9898 HOLD</literal> nor <literal>WITH HOLD</literal> is specified,
99- <literal>WITH HOLD</literal> is the default.
99+ <literal>WITHOUT HOLD</literal> is the default.
100100 </para>
101101 </listitem>
102102 </varlistentry>
@@ -105,8 +105,8 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
105105 <term>WITH HOLD</term>
106106 <listitem>
107107 <para>
108- Specifies that the cursor may be used after the transaction
109- that creates it successfully commits.
108+ Specifies that the cursor maycontinue to be used after the
109+ transaction that creates it successfully commits.
110110 </para>
111111 </listitem>
112112 </varlistentry>
@@ -163,7 +163,7 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
163163
164164 <para>
165165 The <literal>BINARY</literal>, <literal>INSENSITIVE</literal>,
166- <literal>SCROLL</literal> keywords may appear in any order.
166+ and <literal>SCROLL</literal> keywords may appear in any order.
167167 </para>
168168 </refsect2>
169169
@@ -296,11 +296,14 @@ ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
296296 <para>
297297 If <literal>WITH HOLD</literal> is specified and the transaction
298298 that created the cursor successfully commits, the cursor can be
299- accessed outside the creating transaction. If the creating
300- transaction is aborted, the cursor is removed. A cursor created
299+ continue to be accessed by subsequent transactions in the same session.
300+ (But if the creating
301+ transaction is aborted, the cursor is removed.) A cursor created
301302 with <literal>WITH HOLD</literal> is closed when an explicit
302- <command>CLOSE</command> command is issued on it, or the client
303- connection is terminated.
303+ <command>CLOSE</command> command is issued on it, or when the client
304+ connection is terminated. In the current implementation, the rows
305+ represented by a held cursor are copied into a temporary file or
306+ memory area so that they remain available for subsequent transactions.
304307 </para>
305308
306309 <para>
@@ -312,7 +315,8 @@ ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
312315 plan is simple enough that no extra overhead is needed to support
313316 it. However, application developers are advised not to rely on
314317 using backward fetches from a cursor that has not been created
315- with <literal>SCROLL</literal>.
318+ with <literal>SCROLL</literal>. If <literal>NO SCROLL</> is specified,
319+ then backward fetches are disallowed in any case.
316320 </para>
317321
318322 <para>