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

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Support for RANGE ... PRECEDING windows in OVER
Дата
Msg-id 51D21F9E.2030405@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Support for RANGE ... PRECEDING windows in OVER  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Support for RANGE ... PRECEDING windows in OVER  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Eliminating PD_ALL_VISIBLE, take 2
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Eliminating PD_ALL_VISIBLE, take 2