Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2025-10-02 13:26:00
Message-ID: b8fd8116-cacb-409d-b9d9-7478188ca536@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Jiah He!

Thanks!

1.
>I am confused by the above comments "we compare upper bound only".

Replaced: upper -> lower.

2.
>some of the function partition_rbound_cmp can be replaced by marco
>compare_range_bounds,
>for example in check_two_partitions_bounds_range we can use
>compare_range_bounds instead of partition_rbound_cmp
>not sure if it's worth it or not.

I think would be better keep partition_rbound_cmp in this function
because we should use "false" instead of "second_lower->kind".

3.
><varlistentry id="sql-altertable-split-partition">
>should come after
><varlistentry id="sql-altertable-merge-partitions">
>I’ve refactored the SPLIT PARTITION docs quite a bit—let me know if
>they make sense.
>Also tweaked the regression tests a little again.

Applied.
Unfortunately, I don't know English well enough to spot the inaccuracies
in doc.
It looks good in translation.

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

Attachment Content-Type Size
v62-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch text/plain 170.3 KB
v62-0002-Implement-ALTER-TABLE-.-SPLIT-PARTITION-.-comman.patch text/plain 232.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mingli Zhang 2025-10-02 13:55:36 Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs
Previous Message Álvaro Herrera 2025-10-02 13:18:16 Re: allow benign typedef redefinitions (C11)