aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/partitioning/partbounds.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 6b35111ebb6..091d6e886b6 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -648,13 +648,14 @@ create_list_bounds(PartitionBoundSpec **boundspecs, int nparts,
index);
/*
- * Mark the NULL partition as interleaved if we find that it
- * allows some other non-NULL Datum.
+ * Otherwise, if the null_index exists in the indexes array,
+ * then the NULL partition must also allow some other Datum,
+ * therefore it's "interleaved".
*/
- if (partition_bound_accepts_nulls(boundinfo) &&
- index == boundinfo->null_index)
+ else if (partition_bound_accepts_nulls(boundinfo) &&
+ index == boundinfo->null_index)
boundinfo->interleaved_parts = bms_add_member(boundinfo->interleaved_parts,
- boundinfo->null_index);
+ index);
last_index = index;
}