Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

Поиск
Список
Период
Сортировка
От Dmitry Koval
Тема Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Дата
Msg-id 195b67ee-ef41-4451-9396-844442eef1a4@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (jian he <jian.universality@gmail.com>)
Список pgsql-hackers
Hi!

1.
 >this comment seems wrong?
 >it should be "does this partitioned table (parent) have a default
 >partition?

Agreed, this comment belongs to different code position. Corrected.

2.
 >This error message is not good, IMHO. I don't really have any good
 >ideas though.
 >if we polish this message later, now we can add a comment: "FIXME
 >improve this error message".

Probably it won't be possible to make the error message correct for both 
MERGE PARTITIONS and SPLIT PARTITION.
I split code for MERGE PARTITIONS and SPLIT PARTITION and now error 
messages are different for them.

3.
 >after createPartitionTable->heap_create_with_catalog do the error check
 >seems unintuitive to me.
 >it can be checked right after RangeVarGetAndCheckCreationNamespace.

I agree that these error checks are unintuitive.
But the createPartitionTable function, which contains checks, will be 
used in many places - not only for MERGE PARTITIONS, but also for SPLIT 
PARTITION. I think it's not a good idea to do the same checks in 
different places in code. Maybe it's better to do these checks in one 
place (even though it's unintuitive)?


-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
Вложения

В списке pgsql-hackers по дате отправления: