Re: Precedence of '|' operator (was Re: [patch,rfc] binary operators on integers) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Precedence of '|' operator (was Re: [patch,rfc] binary operators on integers)
Date
Msg-id 27246.971381885@sss.pgh.pa.us
Whole thread Raw
In response to Precedence of '|' operator (was Re: [patch,rfc] binary operators on integers)  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Precedence of '|' operator (was Re: [patch,rfc] binary operators on integers)  (Marko Kreen <marko@l-t.ee>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Even though I think '|' is clearly given a bogus precedence, I doubt
>> it's a good idea to change it.

> The only builtin '|' operator, besides the not-there-yet bitor, is some
> arcane prefix operator for the "tinterval" type, which returns the start
> of the interval.  This is all long dead so that would perhaps give us a
> chance to change this before we add "or" operators.  That might weigh more
> than the possibility of a few users having highly specialized '|'
> operators that rely on this precedence.

Well, that's a good point --- it isn't going to get any less painful to
fix it later.  Do we want to just remove the special treatment of '|'
and let it become one with the undifferentiated mass of Op, or do we
want to try to set up reasonable precedence for all the bitwise
operators (and if so, what should that be)?  The second choice has a
greater chance of breaking existing apps because it's changing more
operators ...

Thomas, any opinions here?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: [INTERFACES] JDBC Large ResultSet problem + BadTimeStamp Patch
Next
From: Marko Kreen
Date:
Subject: Re: [patch,rfc] binary operators on integers