aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_relation.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-02-21 11:33:07 -0500
committerPeter Eisentraut <peter_e@gmx.net>2017-02-21 11:59:09 -0500
commit38d103763d14baddf3cbfe4b00b501059fc9447f (patch)
treea69106fc39af0e181307f40fd3ba43b1930c3fcc /src/backend/parser/parse_relation.c
parent4e5ce3c1aeadf81b504bc9d683b67950bd3f8766 (diff)
downloadpostgresql-38d103763d14baddf3cbfe4b00b501059fc9447f.tar.gz
postgresql-38d103763d14baddf3cbfe4b00b501059fc9447f.zip
Make more use of castNode()
Diffstat (limited to 'src/backend/parser/parse_relation.c')
-rw-r--r--src/backend/parser/parse_relation.c3
1 files changed, 1 insertions, 2 deletions
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))