mirror of
https://github.com/postgres/postgres.git
synced 2026-06-09 00:32:10 -04: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:
parent
e969f9a780
commit
d515365a61
1 changed files with 7 additions and 4 deletions
|
|
@ -672,10 +672,13 @@ _copyMergeJoin(const MergeJoin *from)
|
|||
*/
|
||||
COPY_NODE_FIELD(mergeclauses);
|
||||
numCols = list_length(from->mergeclauses);
|
||||
COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
|
||||
COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
|
||||
COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
|
||||
COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
|
||||
if (numCols > 0)
|
||||
{
|
||||
COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
|
||||
COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
|
||||
COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
|
||||
COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
|
||||
}
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue