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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Kreen <marko(at)l-t(dot)ee>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Precedence of '|' operator (was Re: [patch,rfc] binary operators on integers)
Date: 2000-10-12 19:46:21
Message-ID: Pine.LNX.4.21.0010122134360.12683-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

The tinterval type has pretty interesting parsing rules, btw.:

peter=# select 'whatever you say'::tinterval;
?column?
-----------------------------------------------------
["1935-12-23 09:42:00+01" "1974-04-16 17:52:52+01"]
(1 row)

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-10-12 20:10:55 Re: Core dump
Previous Message Stephan Szabo 2000-10-12 19:45:45 Re: possible constraint bug?