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: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2025-09-17 19:41:22
Message-ID: 35958a1a-9877-40dc-84cc-ce944342babe@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Jiah He!

1. v57-0001-refactor-for-v57.no-cfbot
Thanks, the patch make the code clearer.
I added small correction in function check_partition_bounds_for_split_range.
Before the patch, the old code contained the condition:
---------------------------------
if (!defaultPart)
{
if (cmpval != 0)
...
}
else
{
if (cmpval < 0)
...
}
---------------------------------
The patch changed this to:
---------------------------------
if (!defaultPart && cmpval != 0)
...
else if (cmpval < 0)
...
---------------------------------
This change is not equivalent to the old code, so it replaced with:
---------------------------------
if (!defaultPart)
{
if (cmpval != 0)
....
}
else if (cmpval < 0)
...
---------------------------------

2. v57-0001-partition_split.sql-test-refactor-based-on-v57.no-cfbot
>I grouped the permission-related tests together and
>removed unnecessary CREATE ROLE commands.
>overall readability improved, i think.

Applied (I agree, readability improved).

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

Attachment Content-Type Size
v58-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch text/plain 170.2 KB
v58-0002-Implement-ALTER-TABLE-.-SPLIT-PARTITION-.-comman.patch text/plain 235.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-09-17 19:53:10 Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM
Previous Message Corey Huinker 2025-09-17 19:36:40 Re: someone else to do the list of acknowledgments