Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 00f2a25

Browse files
committed
Add missing initializations of p_perminfo
In a61b1f7, we failed to update transformFromClauseItem() and buildNSItemFromLists() to set ParseNamespaceItem.p_perminfo causing it to point to garbage. Pointed out by Tom Lane. Reported-by: Farias de Oliveira <matheusfarias519@gmail.com> Discussion: https://postgr.es/m/3173476.1689286373%40sss.pgh.pa.us Backpatch-through: 16
1 parent a0363ab commit 00f2a25

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/backend/parser/parse_clause.c

+1
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,7 @@ transformFromClauseItem(ParseState *pstate, Node *n,
15731573
jnsitem->p_names = j->join_using_alias;
15741574
jnsitem->p_rte = nsitem->p_rte;
15751575
jnsitem->p_rtindex = nsitem->p_rtindex;
1576+
jnsitem->p_perminfo = NULL;
15761577
/* no need to copy the first N columns, just use res_nscolumns */
15771578
jnsitem->p_nscolumns = res_nscolumns;
15781579
/* set default visibility flags; might get changed later */

src/backend/parser/parse_relation.c

+1
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@ buildNSItemFromLists(RangeTblEntry *rte, Index rtindex,
13921392
nsitem->p_names = rte->eref;
13931393
nsitem->p_rte = rte;
13941394
nsitem->p_rtindex = rtindex;
1395+
nsitem->p_perminfo = NULL;
13951396
nsitem->p_nscolumns = nscolumns;
13961397
/* set default visibility flags; might get changed later */
13971398
nsitem->p_rel_visible = true;

0 commit comments

Comments
 (0)