Skip site navigation (1) Skip section navigation (2)

pgsql: Remove precedence labeling of keywords TRUE, FALSE, UNKNOWN,and

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove precedence labeling of keywords TRUE, FALSE, UNKNOWN,and
Date: 2011-05-06 00:39:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Remove precedence labeling of keywords TRUE, FALSE, UNKNOWN, and ZONE.

These were labeled with precedences just to avoid attaching explicit
precedences to the productions in which they were the last terminal symbol.
Since a terminal symbol precedence marking can affect many other things
too, it seems like better practice to attach precedence labels to the
productions, and not mark the terminal symbols.

Ideally we'd also remove the precedence attached to NULL_P, but it turns
out that we are actually depending on that having a precedence higher than
POSTFIXOP, else we get a shift/reduce conflict for postfix operators in
b_expr.  (Which more or less proves my point about these markings having a
high risk of unexpected consequences.)  For the moment, move NULL_P into
the set of keywords grouped with IDENT, so that at least it will act
similarly to non-keywords; and document the interaction.



Modified Files
src/backend/parser/gram.y |   27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2011-05-06 16:58:11
Subject: pgsql: Move RegisterPredicateLockingXid() call to a safer place.
Previous:From: Magnus HaganderDate: 2011-05-05 21:02:12
Subject: pgsql: Unbreak the regression tests from my previous commit

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group