Commit d4c74651 authored by Tom Lane's avatar Tom Lane

Remove no-longer-used RTE argument of markVarForSelectPriv().

In the wake of c028faf2, this is no longer needed.  I left it
out of that patch since the API change would be undesirable in
a released branch; but there's no reason not to do it in HEAD.
parent 42d74e0c
......@@ -58,7 +58,6 @@ static int extractRemainingColumns(ParseNamespaceColumn *src_nscolumns,
List **res_colnames, List **res_colvars,
ParseNamespaceColumn *res_nscolumns);
static Node *transformJoinUsingClause(ParseState *pstate,
RangeTblEntry *leftRTE, RangeTblEntry *rightRTE,
List *leftVars, List *rightVars);
static Node *transformJoinOnClause(ParseState *pstate, JoinExpr *j,
List *namespace);
......@@ -302,7 +301,6 @@ extractRemainingColumns(ParseNamespaceColumn *src_nscolumns,
*/
static Node *
transformJoinUsingClause(ParseState *pstate,
RangeTblEntry *leftRTE, RangeTblEntry *rightRTE,
List *leftVars, List *rightVars)
{
Node *result;
......@@ -325,8 +323,8 @@ transformJoinUsingClause(ParseState *pstate,
A_Expr *e;
/* Require read access to the join variables */
markVarForSelectPriv(pstate, lvar, leftRTE);
markVarForSelectPriv(pstate, rvar, rightRTE);
markVarForSelectPriv(pstate, lvar);
markVarForSelectPriv(pstate, rvar);
/* Now create the lvar = rvar join condition */
e = makeSimpleA_Expr(AEXPR_OP, "=",
......@@ -1411,8 +1409,6 @@ transformFromClauseItem(ParseState *pstate, Node *n,
}
j->quals = transformJoinUsingClause(pstate,
l_nsitem->p_rte,
r_nsitem->p_rte,
l_usingvars,
r_usingvars);
}
......
......@@ -2525,7 +2525,7 @@ transformWholeRowRef(ParseState *pstate, ParseNamespaceItem *nsitem,
result->location = location;
/* mark relation as requiring whole-row SELECT access */
markVarForSelectPriv(pstate, result, nsitem->p_rte);
markVarForSelectPriv(pstate, result);
return (Node *) result;
}
......
......@@ -740,7 +740,7 @@ scanNSItemForColumn(ParseState *pstate, ParseNamespaceItem *nsitem,
var->location = location;
/* Require read access to the column */
markVarForSelectPriv(pstate, var, rte);
markVarForSelectPriv(pstate, var);
return (Node *) var;
}
......@@ -1074,11 +1074,9 @@ markRTEForSelectPriv(ParseState *pstate, int rtindex, AttrNumber col)
* markVarForSelectPriv
* Mark the RTE referenced by the Var as requiring SELECT privilege
* for the Var's column (the Var could be a whole-row Var, too)
*
* The rte argument is unused and will be removed later.
*/
void
markVarForSelectPriv(ParseState *pstate, Var *var, RangeTblEntry *rte)
markVarForSelectPriv(ParseState *pstate, Var *var)
{
Index lv;
......@@ -3123,7 +3121,7 @@ expandNSItemAttrs(ParseState *pstate, ParseNamespaceItem *nsitem,
te_list = lappend(te_list, te);
/* Require read access to each column */
markVarForSelectPriv(pstate, varnode, rte);
markVarForSelectPriv(pstate, varnode);
}
Assert(name == NULL && var == NULL); /* lists not the same length? */
......
......@@ -1397,7 +1397,7 @@ ExpandSingleTable(ParseState *pstate, ParseNamespaceItem *nsitem,
{
Var *var = (Var *) lfirst(l);
markVarForSelectPriv(pstate, var, rte);
markVarForSelectPriv(pstate, var);
}
return vars;
......
......@@ -41,8 +41,7 @@ extern Node *scanNSItemForColumn(ParseState *pstate, ParseNamespaceItem *nsitem,
int location);
extern Node *colNameToVar(ParseState *pstate, const char *colname, bool localonly,
int location);
extern void markVarForSelectPriv(ParseState *pstate, Var *var,
RangeTblEntry *rte);
extern void markVarForSelectPriv(ParseState *pstate, Var *var);
extern Relation parserOpenTable(ParseState *pstate, const RangeVar *relation,
int lockmode);
extern ParseNamespaceItem *addRangeTableEntry(ParseState *pstate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment