Hi, Jiah He!
1.
>duplicated CommandCounterIncrement call?
Probably this duplication is necessary to rename partition correctly ...
2.
>we can simply call deparse_expression. so I removed the
>get_list_partvalue_string.
I agree. This looks better.
3.
>partitions_lists_intersection
>will get all the common Const nodes in two
>PartitionBoundSpec->listdatums.
>but that's expensive, and we only need the first common Const location
>for error reporting, so I refactored it too.
Ok. If a universal function is needed in the future,
partitions_lists_intersection can be modified.
4.
> I also heavily refactor the test again....
Thanks! Applied with minor changes.
--
With best regards,
Dmitry Koval
Postgres Professional: http://postgrespro.com