diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-31 16:36:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-31 16:36:07 +0000 |
commit | bc421c35b1ee6beada9b357429847a2b3a0e4449 (patch) | |
tree | c46df6b2a3241de4bb188a8a99345ef3a9da2087 /src/backend/executor/execUtils.c | |
parent | 310578efee210f891c5952cfdbae7c17a4bcadba (diff) | |
download | postgresql-bc421c35b1ee6beada9b357429847a2b3a0e4449.tar.gz postgresql-bc421c35b1ee6beada9b357429847a2b3a0e4449.zip |
If we're gonna use ExecRelationIsTargetRelation here, might as well
simplify a bit further.
Diffstat (limited to 'src/backend/executor/execUtils.c')
-rw-r--r-- | src/backend/executor/execUtils.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 91baffb4e78..fe76a337747 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.148 2007/07/27 19:09:04 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.149 2007/07/31 16:36:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -816,15 +816,14 @@ ExecOpenScanRelation(EState *estate, Index scanrelid) LOCKMODE lockmode; /* - * Determine the lock type we need. First, scan to see if target - * relation is a result relation. + * Determine the lock type we need. First, scan to see if target relation + * is a result relation. If not, check if it's a FOR UPDATE/FOR SHARE + * relation. In either of those cases, we got the lock already. */ lockmode = AccessShareLock; if (ExecRelationIsTargetRelation(estate, scanrelid)) lockmode = NoLock; - - /* If not, check if it's a FOR UPDATE/FOR SHARE relation */ - if (lockmode == AccessShareLock) + else { ListCell *l; |