Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4a5f38c

Browse files
committed
Code review for holdable-cursors patch. Fix error recovery, memory
context sloppiness, some other things. Includes Neil's mopup patchof 22-Apr.
1 parent6a17d22 commit4a5f38c

File tree

18 files changed

+375
-312
lines changed

18 files changed

+375
-312
lines changed

‎doc/src/sgml/ref/declare.sgml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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 $
33
PostgreSQL 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
8383
Specifies that the cursor may be used to retrieve rows in a
8484
nonsequential fashion (e.g., backward). Depending upon the
8585
complexity of the query's execution plan, specifying
86-
<literal>SCROLL</literal> may impose aslightperformance penalty
86+
<literal>SCROLL</literal> may impose a performance penalty
8787
on 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 tobe 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>

‎src/backend/catalog/sql_features.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ E121Basic cursor support06Positioned UPDATE statementNO
9595
E121Basic cursor support07Positioned DELETE statementNO
9696
E121Basic cursor support08CLOSE statementYES
9797
E121Basic cursor support10FETCH statement implicit NEXTYES
98-
E121Basic cursor support17WITH HOLD cursorsNO
98+
E121Basic cursor support17WITH HOLD cursorsYES
9999
E131Null value support (nulls in lieu of values)YES
100100
E141Basic integrity constraintsYES
101101
E141Basic integrity constraints01NOT NULL constraintsYES
@@ -214,12 +214,12 @@ F401Extended joined table03UNION JOINYES
214214
F401Extended joined table04CROSS JOINYES
215215
F411Time zone specificationYES
216216
F421National characterYES
217-
F431Read-only scrollable cursorsNO
217+
F431Read-only scrollable cursorsYES
218218
F431Read-only scrollable cursors01FETCH with explicit NEXTYES
219-
F431Read-only scrollable cursors02FETCH FIRSTNO
220-
F431Read-only scrollable cursors03FETCH LASTNO
219+
F431Read-only scrollable cursors02FETCH FIRSTYES
220+
F431Read-only scrollable cursors03FETCH LASTYES
221221
F431Read-only scrollable cursors04FETCH PRIORYES
222-
F431Read-only scrollable cursors05FETCH ABSOLUTENO
222+
F431Read-only scrollable cursors05FETCH ABSOLUTEYES
223223
F431Read-only scrollable cursors06FETCH RELATIVEYES
224224
F441Extended set function supportYES
225225
F451Character set definitionNO
@@ -319,7 +319,7 @@ T211Basic trigger capability04FOR EACH ROW triggersYES
319319
T211Basic trigger capability05Ability to specify a search condition that must be true before the trigger is invokedNO
320320
T211Basic trigger capability06Support for run-time rules for the interaction of triggers and constraintsNO
321321
T211Basic trigger capability07TRIGGER privilegeYES
322-
T211Basic trigger capability08Multiple triggers for the sametheevent are executed in the order in which they were createdNO
322+
T211Basic trigger capability08Multiple triggers for the same event are executed in the order in which they were createdNOintentionally omitted
323323
T212Enhanced trigger capabilityYES
324324
T231SENSITIVE cursorsYES
325325
T241START TRANSACTION statementYES

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp