mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-28 07:21:51 +02:00
Fix allocation of UniqueRelInfo
Reported-by: Richard Guo Discussion: https://postgr.es/m/CAMbWs4_STsG1PKQBuvQC8W4sPo3KvML3=jOTjKLUYQuK3g8cpQ@mail.gmail.com
This commit is contained in:
parent
2c7c6c417f
commit
93c85db3b5
@ -1321,7 +1321,7 @@ innerrel_is_unique_ext(PlannerInfo *root,
|
|||||||
* supersets of them anyway.
|
* supersets of them anyway.
|
||||||
*/
|
*/
|
||||||
old_context = MemoryContextSwitchTo(root->planner_cxt);
|
old_context = MemoryContextSwitchTo(root->planner_cxt);
|
||||||
uniqueRelInfo = palloc(sizeof(UniqueRelInfo));
|
uniqueRelInfo = makeNode(UniqueRelInfo);
|
||||||
uniqueRelInfo->extra_clauses = outer_exprs;
|
uniqueRelInfo->extra_clauses = outer_exprs;
|
||||||
uniqueRelInfo->outerrelids = bms_copy(outerrelids);
|
uniqueRelInfo->outerrelids = bms_copy(outerrelids);
|
||||||
innerrel->unique_for_rels = lappend(innerrel->unique_for_rels,
|
innerrel->unique_for_rels = lappend(innerrel->unique_for_rels,
|
||||||
|
Loading…
Reference in New Issue
Block a user