Hi,
I started looking into Rahila's default_partition_v11.patch, and reworked on
few things as below:
- I tried to cover all the review comments posted on the thread. Do let
me know if something is missing.
- Got rid of the functions get_qual_for_default() and generate_qual_for_defaultpart().
There is no need of collecting boundspecs of all the partitions in case of list
partition, the list is available in boundinfo->ndatums, an expression for
default can be created from the information that is available in boundinfo.
- Got rid of variable has_default, and added a macro for it.
- Changed the logic of checking the overlapping of existing rows in default
partition. Earlier version of patch used to build new constraints for default
partition table and then was checking if any of existing rows violate those
constraints. However, current version of patch just checks if any of the rows in
default partition satisfy the new partition's constraint and fail if there
exists any.
This logic can also be used as it is for default partition in case of RANGE
partitioning.
- Simplified grammar rule.
- Got rid of PARTITION_DEFAULT since DEFAULT is not a different partition
strategy, the applicable logic is also revised:
- There are few other code adjustments like: indentation, commenting, code
simplification etc.
- Added regression tests.
TODO:
Documentation, I am working on it. Will updated the patch soon.
PFA.
Regards,
Jeevan