aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_relation.c
diff options
context:
space:
mode:
authorAmit Langote <amitlan@postgresql.org>2023-07-14 14:28:38 +0900
committerAmit Langote <amitlan@postgresql.org>2023-07-14 14:56:35 +0900
commit00f2a2556c9b23050e4f987e5d563b6856b83fc2 (patch)
tree334c1a212506aa81a514888ddc1ba619249d04c2 /src/backend/parser/parse_relation.c
parenta0363ab7aafda7d16ae59e72d86866c02ad3d657 (diff)
downloadpostgresql-00f2a2556c9b23050e4f987e5d563b6856b83fc2.tar.gz
postgresql-00f2a2556c9b23050e4f987e5d563b6856b83fc2.zip
Add missing initializations of p_perminfo
In a61b1f74823, 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
Diffstat (limited to 'src/backend/parser/parse_relation.c')
-rw-r--r--src/backend/parser/parse_relation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 41d60494b97..864ea9b0d5d 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;