diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index f61f794755..334b9b42bd 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -1573,6 +1573,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, jnsitem->p_names = j->join_using_alias; jnsitem->p_rte = nsitem->p_rte; jnsitem->p_rtindex = nsitem->p_rtindex; + jnsitem->p_perminfo = NULL; /* no need to copy the first N columns, just use res_nscolumns */ jnsitem->p_nscolumns = res_nscolumns; /* set default visibility flags; might get changed later */ diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 41d60494b9..864ea9b0d5 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -1392,6 +1392,7 @@ buildNSItemFromLists(RangeTblEntry *rte, Index rtindex, nsitem->p_names = rte->eref; nsitem->p_rte = rte; nsitem->p_rtindex = rtindex; + nsitem->p_perminfo = NULL; nsitem->p_nscolumns = nscolumns; /* set default visibility flags; might get changed later */ nsitem->p_rel_visible = true;