Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Tom Lane
Dean Rasheed writes: > On Fri, 27 Oct 2023 at 13:56, Ashutosh Bapat > wrote: >> Should we change this to call INTERVAL_NOBEGIN() to be added by >> infinite interval patches? > Given that this is a bug that can lead to incorrect query results, I > plan to back-patch it, and INTERVAL_NOBEGIN() wou

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Dean Rasheed
On Fri, 27 Oct 2023 at 13:56, Ashutosh Bapat wrote: > > Should we change this to call INTERVAL_NOBEGIN() to be added by > infinite interval patches? > Given that this is a bug that can lead to incorrect query results, I plan to back-patch it, and INTERVAL_NOBEGIN() wouldn't make sense in back-bra

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Ashutosh Bapat
On Fri, Oct 27, 2023 at 2:57 PM Dean Rasheed wrote: > > In contrib/btree_gin, leftmostvalue_interval() does this: > > leftmostvalue_interval(void) > { > Interval *v = palloc(sizeof(Interval)); > > v->time = DT_NOBEGIN; > v->day = 0; > v->month = 0; > return IntervalPGetDatum(

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Heikki Linnakangas
On 27/10/2023 12:26, Dean Rasheed wrote: In contrib/btree_gin, leftmostvalue_interval() does this: leftmostvalue_interval(void) { Interval *v = palloc(sizeof(Interval)); v->time = DT_NOBEGIN; v->day = 0; v->month = 0; return IntervalPGetDatum(v); } which is a long wa

btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Dean Rasheed
In contrib/btree_gin, leftmostvalue_interval() does this: leftmostvalue_interval(void) { Interval *v = palloc(sizeof(Interval)); v->time = DT_NOBEGIN; v->day = 0; v->month = 0; return IntervalPGetDatum(v); } which is a long way short of the minimum possible interval value.