Skip to content

Commit 93c85db

Browse files
committed
Fix allocation of UniqueRelInfo
Reported-by: Richard Guo Discussion: https://postgr.es/m/CAMbWs4_STsG1PKQBuvQC8W4sPo3KvML3=jOTjKLUYQuK3g8cpQ@mail.gmail.com
1 parent 2c7c6c4 commit 93c85db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/optimizer/plan/analyzejoins.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ innerrel_is_unique_ext(PlannerInfo *root,
13211321
* supersets of them anyway.
13221322
*/
13231323
old_context = MemoryContextSwitchTo(root->planner_cxt);
1324-
uniqueRelInfo = palloc(sizeof(UniqueRelInfo));
1324+
uniqueRelInfo = makeNode(UniqueRelInfo);
13251325
uniqueRelInfo->extra_clauses = outer_exprs;
13261326
uniqueRelInfo->outerrelids = bms_copy(outerrelids);
13271327
innerrel->unique_for_rels = lappend(innerrel->unique_for_rels,

0 commit comments

Comments
 (0)