From 38d103763d14baddf3cbfe4b00b501059fc9447f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 21 Feb 2017 11:33:07 -0500 Subject: Make more use of castNode() --- src/backend/parser/parse_relation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/backend/parser/parse_relation.c') diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index e693c316e3b..cf69533b53d 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -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)) -- cgit v1.2.3