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

Commitdc58805

Browse files
committed
Clarify what's supposed to happen when a cursor FETCH is rolled back
by aborting a subtransaction. Per discussion with Heikki.
1 parent8c1c2e3 commitdc58805

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎doc/src/sgml/ref/rollback_to.sgml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/rollback_to.sgml,v 1.10 2008/11/14 10:22:47 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/rollback_to.sgml,v 1.11 2009/12/02 21:11:12 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -77,11 +77,14 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re
7777
Cursors have somewhat non-transactional behavior with respect to
7878
savepoints. Any cursor that is opened inside a savepoint will be closed
7979
when the savepoint is rolled back. If a previously opened cursor is
80-
affected by a
81-
<command>FETCH</> command inside asavepoint that is later rolled
82-
back, the cursorpositionremains at the positionthat <command>FETCH</>
83-
left it pointing to (that is, <command>FETCH</> is not rolled back).
80+
affected by a<command>FETCH</> or <command>MOVE</> command inside a
81+
savepoint that is later rolled back, the cursor remains at the
82+
position that <command>FETCH</> left it pointing to (that is, the cursor
83+
motion caused by <command>FETCH</> is not rolled back).
8484
Closing a cursor is not undone by rolling back, either.
85+
However, other side-effects caused by the cursor's query (such as
86+
side-effects of volatile functions called by the query) <emphasis>are</>
87+
rolled back if they occur during a savepoint that is later rolled back.
8588
A cursor whose execution causes a transaction to abort is put in a
8689
cannot-execute state, so while the transaction can be restored using
8790
<command>ROLLBACK TO SAVEPOINT</>, the cursor can no longer be used.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp