mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Make more use of castNode()
This commit is contained in:
@ -910,12 +910,11 @@ markRTEForSelectPriv(ParseState *pstate, RangeTblEntry *rte,
|
||||
JoinExpr *j;
|
||||
|
||||
if (rtindex > 0 && rtindex <= list_length(pstate->p_joinexprs))
|
||||
j = (JoinExpr *) list_nth(pstate->p_joinexprs, rtindex - 1);
|
||||
j = castNode(JoinExpr, list_nth(pstate->p_joinexprs, rtindex - 1));
|
||||
else
|
||||
j = NULL;
|
||||
if (j == NULL)
|
||||
elog(ERROR, "could not find JoinExpr for whole-row reference");
|
||||
Assert(IsA(j, JoinExpr));
|
||||
|
||||
/* Note: we can't see FromExpr here */
|
||||
if (IsA(j->larg, RangeTblRef))
|
||||
|
Reference in New Issue
Block a user