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

Commitbc421c3

Browse files
committed
If we're gonna use ExecRelationIsTargetRelation here, might as well
simplify a bit further.
1 parent310578e commitbc421c3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎src/backend/executor/execUtils.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.148 2007/07/27 19:09:04 neilc Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.149 2007/07/31 16:36:07 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -816,15 +816,14 @@ ExecOpenScanRelation(EState *estate, Index scanrelid)
816816
LOCKMODElockmode;
817817

818818
/*
819-
* Determine the lock type we need. First, scan to see if target
820-
* relation is a result relation.
819+
* Determine the lock type we need. First, scan to see if target relation
820+
* is a result relation. If not, check if it's a FOR UPDATE/FOR SHARE
821+
* relation. In either of those cases, we got the lock already.
821822
*/
822823
lockmode=AccessShareLock;
823824
if (ExecRelationIsTargetRelation(estate,scanrelid))
824825
lockmode=NoLock;
825-
826-
/* If not, check if it's a FOR UPDATE/FOR SHARE relation */
827-
if (lockmode==AccessShareLock)
826+
else
828827
{
829828
ListCell*l;
830829

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp