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

From Zhihong Yu
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id CALNJ-vTgp527=NiduNv5Q42pY3zaUnJjTDEf1-=JcX6sZyGFRA@mail.gmail.com
Whole thread Raw
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Dmitry Koval <d.koval@postgrespro.ru>)
Responses Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
List pgsql-hackers


On Tue, Oct 11, 2022 at 9:22 AM Dmitry Koval <d.koval@postgrespro.ru> wrote:
Hi!

Fixed couple warnings (for cfbot).

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
Hi,
For v12-0001-PGPRO-ALTER-TABLE-MERGE-PARTITIONS-command.patch:

+       if (equal(name, cmd->name))
+           /* One new partition can have the same name as merged partition. */
+           isSameName = true;

I think there should be a check before assigning true to isSameName - if isSameName is true, that means there are two partitions with this same name.

Cheers 

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Remove an unnecessary LSN calculation while validating WAL page header
Next
From: Bruce Momjian
Date:
Subject: Re: Clarifying docs on nuance of select and update policies