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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers