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

From Craig Ringer
Subject Re: Support for RANGE ... PRECEDING windows in OVER
Date
Msg-id 51C428ED.10902@2ndquadrant.com
Whole thread Raw
In response to Re: Support for RANGE ... PRECEDING windows in OVER  (Hitoshi Harada <umi.tanuki@gmail.com>)
Responses Re: Support for RANGE ... PRECEDING windows in OVER  (Hitoshi Harada <umi.tanuki@gmail.com>)
List pgsql-hackers
On 06/21/2013 05:32 PM, Hitoshi Harada wrote:

> 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.

Zero can be tested for with `val = (@ val)` ie `val = abs(val)`. That
should make sense for any type in which the concept of zero makes sense.

Thanks for the warning on that issue.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: Patch for removng unused targets
Next
From: "Erik Rijkers"
Date:
Subject: Re: trgm regex index peculiarity