Re: Rangejoin rebased - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Rangejoin rebased
Date
Msg-id CANP8+jJrZhcucpcuZ3AWGwZ_My=0BLVG0pfqfPwkP7BQhFzZow@mail.gmail.com
Whole thread Raw
In response to Re: Rangejoin rebased  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Rangejoin rebased
List pgsql-hackers
On 17 January 2018 at 05:49, Jeff Davis <pgsql@j-davis.com> wrote:
> On Wed, Jan 10, 2018 at 7:49 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> Do we optimize for TIMESTAMP <@ RANGE as well?
>
> Not currently. It requires a little extra complexity because empty
> ranges will match anything and need special handling.

TIMESTAMP <@ RANGE is arguably more important than RANGE && RANGE

Trying to cast timestamp to range to make that work is a bit hokey

If the problem is just empty ranges, it seems like we should do that here also.

I'd be happy with the optimization only working if ranges are provably
non-empty, e.g. CHECK (NOT isempty(col))
Or perhaps we need non-empty types: e.g. tsrangene

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: PATCH: Configurable file mode mask
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] [PATCH] Improve geometric types