aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/allpaths.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-10-02 22:39:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-10-02 22:39:49 +0000
commit47aa95e951c8291239f15e400d767ea32b5be9b3 (patch)
tree978f2668fce7bd379efc85a4ce2ca4ff79086acf /src/backend/optimizer/path/allpaths.c
parent19241421f250ce3041c55a0508530820d938c667 (diff)
downloadpostgresql-47aa95e951c8291239f15e400d767ea32b5be9b3.tar.gz
postgresql-47aa95e951c8291239f15e400d767ea32b5be9b3.zip
Clean up handling of inherited-table update queries, per bug report
from Sebastian Böck. The fix involves being more consistent about when rangetable entries are copied or modified. Someday we really need to fix this stuff to not scribble on its input data structures in the first place...
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r--src/backend/optimizer/path/allpaths.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index c7b5db73353..b01025a85d3 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.121 2004/08/29 05:06:43 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.122 2004/10/02 22:39:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -124,8 +124,7 @@ set_base_rel_pathlists(Query *root)
/* RangeFunction --- generate a separate plan for it */
set_function_pathlist(root, rel, rte);
}
- else if ((inheritlist = expand_inherited_rtentry(root, rti, true))
- != NIL)
+ else if ((inheritlist = expand_inherited_rtentry(root, rti)) != NIL)
{
/* Relation is root of an inheritance tree, process specially */
set_inherited_rel_pathlist(root, rel, rti, rte, inheritlist);
@@ -224,13 +223,6 @@ set_inherited_rel_pathlist(Query *root, RelOptInfo *rel,
errmsg("SELECT FOR UPDATE is not supported for inheritance queries")));
/*
- * The executor will check the parent table's access permissions when
- * it examines the parent's inheritlist entry. There's no need to
- * check twice, so turn off access check bits in the original RTE.
- */
- rte->requiredPerms = 0;
-
- /*
* Initialize to compute size estimates for whole inheritance tree
*/
rel->rows = 0;