*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.156 2006/08/12 20:05:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.157 2006/08/14 23:39:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* permissions.
*
* If we find an explicit reference to the rel later during parse
- * analysis, scanRTEForColumn will add the ACL_SELECT bit back again. That
- * can't happen for INSERT but it is possible for UPDATE and DELETE.
+ * analysis, we will add the ACL_SELECT bit back again; see
+ * scanRTEForColumn (for simple field references), ExpandColumnRefStar
+ * (for foo.*) and ExpandAllTables (for *).
*/
rte->requiredPerms = requiredPerms;
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.147 2006/08/02 01:59:47 joe Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.148 2006/08/14 23:39:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
rte = addImplicitRTE(pstate, makeRangeVar(schemaname, relname),
cref->location);
+ /* Require read access --- see comments in setTargetTable() */
+ rte->requiredPerms |= ACL_SELECT;
+
rtindex = RTERangeTablePosn(pstate, rte, &sublevels_up);
if (targetlist)
RangeTblEntry *rte = (RangeTblEntry *) lfirst(l);
int rtindex = RTERangeTablePosn(pstate, rte, NULL);
+ /* Require read access --- see comments in setTargetTable() */
+ rte->requiredPerms |= ACL_SELECT;
+
target = list_concat(target,
expandRelAttrs(pstate, rte, rtindex, 0));
}