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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy