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

Commit8befa05

Browse files
committed
Doc: add comments about PreventInTransactionBlock/IsInTransactionBlock.
Add a little to the header comments for these functions to make itclearer what guarantees about commit behavior are provided to callers.(See commitf929441 for context.)Although this is only a comment change, it's really documentationaimed at authors of extensions, so it seems appropriate to back-patch.Yugo Nagata and Tom Lane, per further discussion of bug #17434.Discussion:https://postgr.es/m/17434-d9f7a064ce2a88a3@postgresql.org
1 parent2e42296 commit8befa05

File tree

1 file changed

+8
-0
lines changed
  • src/backend/access/transam

1 file changed

+8
-0
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3386,6 +3386,10 @@ AbortCurrentTransaction(void)
33863386
*a transaction block, typically because they have non-rollback-able
33873387
*side effects or do internal commits.
33883388
*
3389+
*If this routine completes successfully, then the calling statement is
3390+
*guaranteed that if it completes without error, its results will be
3391+
*committed immediately.
3392+
*
33893393
*If we have already started a transaction block, issue an error; also issue
33903394
*an error if we appear to be running inside a user-defined function (which
33913395
*could issue more commands and possibly cause a failure after the statement
@@ -3511,6 +3515,10 @@ CheckTransactionBlock(bool isTopLevel, bool throwError, const char *stmtType)
35113515
*a transaction block than when running as single commands. ANALYZE is
35123516
*currently the only example.
35133517
*
3518+
*If this routine returns "false", then the calling statement is
3519+
*guaranteed that if it completes without error, its results will be
3520+
*committed immediately.
3521+
*
35143522
*isTopLevel: passed down from ProcessUtility to determine whether we are
35153523
*inside a function.
35163524
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp