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 df72c242-a099-4d11-b02e-8ee8474c0455@postgrespro.ru
Whole thread Raw
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (stephane tachoires <stephane.tachoires@gmail.com>)
List pgsql-hackers
Hi!

1.
 >v47-0001-rename-function-argument-and-minor-refactor.no-cfbot

Thanks, applied.


2.
 >+ * Construct a map from the LIKE relation's attnos to the child rel's
 >this comment in createTableConstraints is confusing, especially the
 > word "LIKE". I didn' change it though.

It is copy from expandTableLikeClause function. Changed.


3.
 >the argument (Relation rel) never used in moveMergedTablesRows
 >we can remove it, or rename it as "parent_rel".
 >I didn' change it though.

Removed.


4.
 >moveMergedTablesRows was never used in SPLIT PARTITION,
 >so maybe we can rename it to
 >ATMergePartitionMoveTablesRows
 >or
 >ATMergePartitionMoveRows
 >or
 >ATMergePartitionRows
 >what do you think?

I like the name "MergePartitionsMoveRows" (without prefix "AT" - "ALTER 
TABLE", because this function is not called from ATExecCmd function).
Is it ok?


5.
 >so I added a test for it. as you can see below, the error HINT message
 >is not great in this context.
...
 >HINT:  Use DROP ... CASCADE to drop the dependent objects too.

Maybe a special flag (DEPFLAG_NOHINT?) should be added to skip hints for 
the performDeletionCheck function?

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Non-reproducible AIO failure
Next
From: jian he
Date:
Subject: Re: pg_dump misses comments on NOT NULL constraints