1
1
<!--
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 $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -70,8 +70,8 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
70
70
<term>NO SCROLL</term>
71
71
<listitem>
72
72
<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).
75
75
</para>
76
76
</listitem>
77
77
</varlistentry>
@@ -83,7 +83,7 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
83
83
Specifies that the cursor may be used to retrieve rows in a
84
84
nonsequential fashion (e.g., backward). Depending upon the
85
85
complexity of the query's execution plan, specifying
86
- <literal>SCROLL</literal> may impose a slight performance penalty
86
+ <literal>SCROLL</literal> may impose a performance penalty
87
87
on the query's execution time.
88
88
</para>
89
89
</listitem>
@@ -96,7 +96,7 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
96
96
Specifies that the cursor cannot be used outside of the
97
97
transaction that created it. If neither <literal>WITHOUT
98
98
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.
100
100
</para>
101
101
</listitem>
102
102
</varlistentry>
@@ -105,8 +105,8 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
105
105
<term>WITH HOLD</term>
106
106
<listitem>
107
107
<para>
108
- Specifies that the cursor may be used after the transaction
109
- that creates it successfully commits.
108
+ Specifies that the cursor may continue to be used after the
109
+ transaction that creates it successfully commits.
110
110
</para>
111
111
</listitem>
112
112
</varlistentry>
@@ -163,7 +163,7 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
163
163
164
164
<para>
165
165
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.
167
167
</para>
168
168
</refsect2>
169
169
@@ -296,11 +296,14 @@ ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
296
296
<para>
297
297
If <literal>WITH HOLD</literal> is specified and the transaction
298
298
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
301
302
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.
304
307
</para>
305
308
306
309
<para>
@@ -312,7 +315,8 @@ ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
312
315
plan is simple enough that no extra overhead is needed to support
313
316
it. However, application developers are advised not to rely on
314
317
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.
316
320
</para>
317
321
318
322
<para>
0 commit comments