On Tue, Sep 16, 2025 at 6:11 AM Dmitry Koval <[email protected]> wrote:
>
> 7) Additionally, I've made a numerous and small fixes for grammar to the
> docs directly to the patchset.
>

v56-0002, SPLIT PARTITION check_partitions_for_split is way too overwhelming.
Similar to transformPartitionCmdForMerge, we can put some error handling code
to transformPartitionCmdForSplit.
please check the attached refactoring.

in v56-0001
+ Oid newPartitionOid = InvalidOid;
+
+ foreach_oid(mergingPartitionOid, mergingPartitions)
+ {
+ if (mergingPartitionOid == existingRelid)
+ {
+ newPartitionOid = mergingPartitionOid;
+ break;
+ }
+ }

can simplified to
        if (list_member_oid(mergingPartitions, existingRelid))
            newPartitionOid = existingRelid;

Attachment: v56-0001-refactor-v56-check_partitions_for_split.no-cfbot
Description: Binary data

Reply via email to