Re: Precedence of '|' operator (was Re: [HACKERS] [patch,rfc] binary operators on integers)

2000-10-16 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > I'd like to see closer adherence to the "usual" operator precedence. But > I really *hate* having to explicitly call out each rule in the a_expr, > b_expr, and/or c_expr productions. Any way around this? It's not easy in yacc/bison, I don't believe.

Re: Precedence of '|' operator (was Re: [HACKERS] [patch,rfc] binary operators on integers)

2000-10-16 Thread Thomas Lockhart
> 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 (an

Re: Precedence of '|' operator (was Re: [HACKERS] [patch,rfc] binary operators on integers)

2000-10-12 Thread Marko Kreen
On Thu, Oct 12, 2000 at 04:18:05PM -0400, Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> 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-ye

Re: [HACKERS] [patch,rfc] binary operators on integers

2000-10-12 Thread Marko Kreen
On Thu, Oct 12, 2000 at 09:34:05PM +0200, Peter Eisentraut wrote: > Well, what are we going to do with this? I think we should take it. > Since I encouraged him to write it, I'd volunteer to take care of it. Nice :) > We might want to change the bitxor operator to # (or at least something > d

Re: Precedence of '|' operator (was Re: [HACKERS] [patch,rfc] binary operators on integers)

2000-10-12 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> 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, wh

Re: [HACKERS] [patch,rfc] binary operators on integers

2000-10-12 Thread Peter Eisentraut
Well, what are we going to do with this? I think we should take it. Since I encouraged him to write it, I'd volunteer to take care of it. We might want to change the bitxor operator to # (or at least something distinct from ^) as well, for consistency. Marko Kreen writes: > > Well, I was in

Re: [HACKERS] [patch,rfc] binary operators on integers

2000-09-23 Thread Marko Kreen
On Fri, Sep 22, 2000 at 12:26:45PM -0400, Tom Lane wrote: > Marko Kreen <[EMAIL PROTECTED]> writes: > > 1) Precedence. I quite nonscientifically hacked in gram.y, > >and could not still make it understand expression '5 # ~1' > >nor the precedence between '&' and '|#'... > >At the mome

Re: [HACKERS] [patch,rfc] binary operators on integers

2000-09-22 Thread Tom Lane
Marko Kreen <[EMAIL PROTECTED]> writes: > 1) Precedence. I quite nonscientifically hacked in gram.y, >and could not still make it understand expression '5 # ~1' >nor the precedence between '&' and '|#'... >At the moment all the gram.y changes could be dropped and >it works ok, but