Give 'a_expr ::= a_expr Op' production a slightly lower precedence than
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Jan 2001 22:39:08 +0000 (22:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Jan 2001 22:39:08 +0000 (22:39 +0000)
commitf39dd0112480d0a00f39bc149abecc7bf8f66196
tree24696f8c5076f95b2b0ff5f8390930d8f816f54d
parent1610791bf494ec6130fd3b9db37f646c5334a47b
Give 'a_expr ::= a_expr Op' production a slightly lower precedence than
Op, so that the sequence 'a_expr Op Op a_expr' will be parsed as
a_expr Op (Op a_expr) not (a_expr Op) Op a_expr as formerly.  In other
words, prefer treating user-defined operators as prefix operators to
treating them as postfix operators, when there is an ambiguity.
Also clean up a couple of other infelicities in production priority
assignment --- for example, BETWEEN wasn't being given the intended
priority, but that of AND.
src/backend/parser/gram.y