Oliver Ford <ojford(at)gmail(dot)com> writes:
> On Tuesday, 9 January 2018, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So the approach I'm imagining now is a datatype-specific support function
>> along the lines of
>> in_range(a, b, delta) returns bool
>> Likely there are two of these, one each for the PRECEDING and FOLLOWING
>> cases.
> Would you prefer two functions, or a single function with a parameter for
> PRECEDING/FOLLOWING? Maybe:
> in_range(a, b, delta, following) returns bool
You could do it that way too. The two-function approach seems a little
cleaner and easier to document IMO, but it would create more catalog
bloat, so there's that. I don't have a strong preference.
regards, tom lane