Re: Add SPLIT PARTITION/MERGE PARTITIONS commands - Mailing list pgsql-hackers

From Dmitry Koval
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id 35958a1a-9877-40dc-84cc-ce944342babe@postgrespro.ru
Whole thread Raw
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (jian he <jian.universality@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: someone else to do the list of acknowledgments
Next
From: Masahiko Sawada
Date:
Subject: Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM