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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Marko Kreen <marko(at)l-t(dot)ee>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Precedence of '|' operator (was Re: [patch, rfc] binary operators on integers)
Date: 2000-10-12 20:18:05
Message-ID: 27246.971381885@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-10-12 20:25:08 Re: possible constraint bug?
Previous Message Joseph Shraibman 2000-10-12 20:17:28 Re: [INTERFACES] JDBC Large ResultSet problem + BadTimeStamp Patch