From 47aa95e951c8291239f15e400d767ea32b5be9b3 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 2 Oct 2004 22:39:49 +0000 Subject: 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... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/optimizer/path/allpaths.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/backend/optimizer/path/allpaths.c') 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); @@ -223,13 +222,6 @@ set_inherited_rel_pathlist(Query *root, RelOptInfo *rel, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), 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 */ -- cgit v1.2.3