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 195b67ee-ef41-4451-9396-844442eef1a4@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!

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
Attachment

pgsql-hackers by date:

Previous
From: Sutou Kouhei
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
Next
From: Peter Smith
Date:
Subject: Re: [WIP]Vertical Clustered Index (columnar store extension) - take2