aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/allpaths.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-15 19:43:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-15 19:43:47 +0000
commit0656ed3daa29b00c7c41ad44b407a7165f83d453 (patch)
tree2167bd78fa501c3ffed1d0de842ded643c32500b /src/backend/optimizer/path/allpaths.c
parent07c179a82b39ffbc172175382717706d90c714cd (diff)
downloadpostgresql-0656ed3daa29b00c7c41ad44b407a7165f83d453.tar.gz
postgresql-0656ed3daa29b00c7c41ad44b407a7165f83d453.zip
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.
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r--src/backend/optimizer/path/allpaths.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 4d868570bcb..b0553894c24 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.176 2008/11/11 18:13:32 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.177 2008/11/15 19:43:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -284,17 +284,6 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
ListCell *l;
/*
- * XXX for now, can't handle inherited expansion of FOR UPDATE/SHARE; can
- * we do better? (This will take some redesign because the executor
- * currently supposes that every rowMark relation is involved in every row
- * returned by the query.)
- */
- if (get_rowmark(root->parse, parentRTindex))
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("SELECT FOR UPDATE/SHARE is not supported for inheritance queries")));
-
- /*
* Initialize to compute size estimates for whole append relation.
*
* We handle width estimates by weighting the widths of different