Re: Support for RANGE ... PRECEDING windows in OVER - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Re: Support for RANGE ... PRECEDING windows in OVER
Date
Msg-id CAP7QgmkRUoQuhHqr_GGdgJvwi9=NarQ8Ek9zwfxXU+2C-PGd6Q@mail.gmail.com
Whole thread Raw
In response to Support for RANGE ... PRECEDING windows in OVER  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Support for RANGE ... PRECEDING windows in OVER  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers



On Thu, Jun 20, 2013 at 7:24 PM, Craig Ringer <craig@2ndquadrant.com> wrote: 
I've missed this feature more than once, and am curious about whether
any more recent changes may have made it cleaner to tackle this, or
whether consensus can be formed on adding the new entries to btree's
opclass to avoid the undesirable explicit lookups of the '+' and '-'
oprators.

 

As far as I know the later development didn't add anything to help this conversation.  I initially thought range type or knn gist would add something, but they were something else far from this.  On the other hand, if this makes it, it'll also open doors to range PARTITION BY for CREATE TABLE command, so the impact will be bigger than you may think.

I also later found that we are missing not only notion of '+' or '-', but also notion of 'zero value' in our catalog.  Per spec, RANGE BETWEEN needs to detect ERROR if the offset value is negative, but it is not always easy if you think about interval, numeric types as opposed to int64 used in ROWS BETWEEN.

Thanks,
--
Hitoshi Harada

pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: refresh materialized view concurrently
Next
From: Thom Brown
Date:
Subject: Re: Config reload/restart preview