Re: Support for RANGE ... PRECEDING windows in OVER

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support for RANGE ... PRECEDING windows in OVER
Date: 2013-06-21 09:32:01
Message-ID: CAP7QgmkRUoQuhHqr_GGdgJvwi9=NarQ8Ek9zwfxXU+2C-PGd6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 20, 2013 at 7:24 PM, Craig Ringer <craig(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2013-06-21 09:35:01 Re: Config reload/restart preview
Previous Message Hitoshi Harada 2013-06-21 09:20:53 Re: refresh materialized view concurrently