mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-21 03:13:05 +08:00
Add missing initializations of p_perminfo
In a61b1f7482
, 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
This commit is contained in:
parent
a0363ab7aa
commit
00f2a2556c
@ -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 */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user