mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Make SELECT FOR UPDATE/SHARE work on inheritance trees, by having the plan
return the tableoid as well as the ctid for any FOR UPDATE targets that have child tables. All child tables are listed in the ExecRowMark list, but the executor just skips the ones that didn't produce the current row. Curiously, this longstanding restriction doesn't seem to have been documented anywhere; so no doc changes.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.411 2008/11/11 18:13:32 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.412 2008/11/15 19:43:46 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1735,8 +1735,10 @@ _copyRowMarkClause(RowMarkClause *from)
|
||||
RowMarkClause *newnode = makeNode(RowMarkClause);
|
||||
|
||||
COPY_SCALAR_FIELD(rti);
|
||||
COPY_SCALAR_FIELD(prti);
|
||||
COPY_SCALAR_FIELD(forUpdate);
|
||||
COPY_SCALAR_FIELD(noWait);
|
||||
COPY_SCALAR_FIELD(isParent);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user