On Fri, Jan 5, 2024 at 1:06 PM jian he <jian.universal...@gmail.com> wrote: > > On Tue, Jan 2, 2024 at 9:59 AM Paul Jungwirth > <p...@illuminatedcomputing.com> wrote: > > > > On 12/31/23 00:51, Paul Jungwirth wrote: > > > That's it for now. > > > > Here is another update. I fixed FOR PORTION OF on partitioned tables, in > > particular when the attnums > > are different from the root partition. > > > > Rebased to cea89c93a1. > > > > Hi. > > +/* > + * range_without_portion_internal - Sets outputs and outputn to the ranges > + * remaining and their count (respectively) after subtracting r2 from r1. > + * The array should never contain empty ranges. > + * The outputs will be ordered. We expect that outputs is an array of > + * RangeType pointers, already allocated with two slots. > + */ > +void > +range_without_portion_internal(TypeCacheEntry *typcache, RangeType *r1, > + RangeType *r2, RangeType **outputs, int *outputn) > I am confused with the name "range_without_portion", I think > "range_not_overlap" would be better. >
range_intersect returns the intersection of two ranges. I think here we are doing the opposite. names the main SQL function "range_not_intersect" and the internal function as "range_not_intersect_internal" should be fine. so people don't need to understand the meaning of "portion".