mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Don't bother copying empty support arrays in a zero-column MergeJoin.
The case could not arise when this code was originally written, but it can now (since we made zero-column MergeJoins work for the benefit of FULL JOIN ON TRUE). I don't think there is any actual bug here, but we might as well treat it consistently with other uses of COPY_POINTER_FIELD(). Per comment from Ashutosh Bapat.
This commit is contained in:
@ -672,10 +672,13 @@ _copyMergeJoin(const MergeJoin *from)
|
|||||||
*/
|
*/
|
||||||
COPY_NODE_FIELD(mergeclauses);
|
COPY_NODE_FIELD(mergeclauses);
|
||||||
numCols = list_length(from->mergeclauses);
|
numCols = list_length(from->mergeclauses);
|
||||||
COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
|
if (numCols > 0)
|
||||||
COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
|
{
|
||||||
COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
|
COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
|
||||||
COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
|
COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
|
||||||
|
COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
|
||||||
|
COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
|
||||||
|
}
|
||||||
|
|
||||||
return newnode;
|
return newnode;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user