diff options
author | Amit Langote <amitlan@postgresql.org> | 2023-07-14 14:28:38 +0900 |
---|---|---|
committer | Amit Langote <amitlan@postgresql.org> | 2023-07-14 14:56:35 +0900 |
commit | 00f2a2556c9b23050e4f987e5d563b6856b83fc2 (patch) | |
tree | 334c1a212506aa81a514888ddc1ba619249d04c2 /src/backend/parser/parse_clause.c | |
parent | a0363ab7aafda7d16ae59e72d86866c02ad3d657 (diff) | |
download | postgresql-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_clause.c')
-rw-r--r-- | src/backend/parser/parse_clause.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index f61f7947552..334b9b42bd5 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 */ |