| From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | ian link <ian(at)ilink(dot)io>, Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Support for RANGE ... PRECEDING windows in OVER |
| Date: | 2013-07-02 00:32:30 |
| Message-ID: | 51D21F9E.2030405@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 07/02/2013 02:39 AM, Robert Haas wrote:
> I'm actually
> not clear that it would be all that bad to assume fixed operator
> names, as we apparently do in a few places despite the existence of
> operator classes. But if that is bad, then I don't know how using @+
> and @- instead helps anything.
Personally I'm not clear why it's bad to reserve certain fundamental
operators like '+' and '-', requiring that they have particular semantics.
Want to use "+" as an alias for || because your Java programmers are
used to writing + for string concatenation? Um, don't do that.
Existing code would be unaffected since RANGE couldn't ever be used in
existing code. At worst, weird user-defined implementations of "+" and
"-" would result in bizarre window function behaviour if the operators
were unsuitable. Exceeding available memory could certainly be an issue
in cases like "+" as concatenation.
The main advantage I see of adding opclass entries for this is that it
makes it explicit when the operators have semantics suitable for use in
range windows.
I don't have a strong opinion on whether we should just use "+" and "-"
or whether we really need an opclass.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2013-07-02 00:59:24 | Re: Eliminating PD_ALL_VISIBLE, take 2 |
| Previous Message | Jeff Davis | 2013-07-02 00:23:26 | Re: Eliminating PD_ALL_VISIBLE, take 2 |