summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-10-23 05:24:52 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-10-23 05:24:52 +0000
commit76d8883c8e3647ac2f7ff3c48226a25b1fd7888b (patch)
tree9f3199b99a0558a25d8ee04d7f8207ef6ecaced4 /src/backend/optimizer
parentab61df9e527dcedbd3bbefbcb8b634b0b72f2ad5 (diff)
downloadpostgresql-76d8883c8e3647ac2f7ff3c48226a25b1fd7888b.tar.gz
When querying a table with child tables, do not check permissions on the
child tables. This was found to be useless and confusing in virtually all cases, and also contrary to the SQL standard.
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/prep/prepunion.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 2f43e32738..e4fe0db547 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.176 2009/10/12 18:10:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.177 2009/10/23 05:24:52 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1244,6 +1244,7 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti)
childrte = copyObject(rte);
childrte->relid = childOID;
childrte->inh = false;
+ childrte->requiredPerms = 0; /* do not require permissions on child tables */
parse->rtable = lappend(parse->rtable, childrte);
childRTindex = list_length(parse->rtable);