Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
| От | Alexander Korotkov | 
|---|---|
| Тема | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands | 
| Дата | |
| Msg-id | CAPpHfdvSBR+sbsRCAybN949tOGArQvMH2QeDXf2L=7NDMNbJfw@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands (Dmitry Koval <d.koval@postgrespro.ru>) | 
| Ответы | 
                	
            		Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
            		
            		 | 
		
| Список | pgsql-hackers | 
On Mon, Sep 22, 2025 at 11:12 PM Dmitry Koval <d.koval@postgrespro.ru> wrote:
Hi, Jiah He!
1.
>duplicated CommandCounterIncrement call?
Probably this duplication is necessary to rename partition correctly ...
The second CommandCounterIncrement() is needed to make the renamed relation visible within our transaction.  Why do we need the first one?  I see tests pass without it.
Also, I doubt this is correct in the partitions_listdatum_intersection() function.
    foreach_node(Const, val1, list1)
{
if (val1->constisnull)
{
if (isnull2)
{
result = lappend(result, val1);
return result;
}
isnull1 = true;
continue;
}
{
if (val1->constisnull)
{
if (isnull2)
{
result = lappend(result, val1);
return result;
}
isnull1 = true;
continue;
}
The branch handling null value in the outer loop, uses null2 flag from the inner loop.  I think for the null value of the outer loop we still need to run inner loop to search for the matching null value.
------
Regards,
Alexander Korotkov
Alexander Korotkov
Supabase
В списке pgsql-hackers по дате отправления: