pgsql/src/backend/parser gram.y

From: Tom Lane <tgl(at)hub(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src/backend/parser gram.y
Date: 2001-01-15 20:36:36
Message-ID: 200101152036.f0FKaa350211@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

CVSROOT: /home/projects/pgsql/cvsroot
Module name: pgsql
Changes by: tgl(at)hub(dot)org 01/01/15 15:36:36

Modified files:
src/backend/parser: gram.y

Log message:
Fix problems with parentheses around sub-SELECT --- for the last time,
I hope. I finally realized that we were going at it backwards: when
there are excess parentheses, they need to be treated as part of the
sub-SELECT, not as part of the surrounding expression. Although either
choice yields an unambiguous grammar, only this way produces a grammar
that is LALR(1). With the old approach we were guaranteed to fail on
either 'SELECT (((SELECT 2)) + 3)' or
'SELECT (((SELECT 2)) UNION SELECT 2)' depending on which way we
resolve the initial shift/reduce conflict. With the new way, the same
reduction track can be followed in both cases until we have advanced
far enough to know whether we are done with the sub-SELECT or not.

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut - PostgreSQL 2001-01-15 21:17:29 pgsql/ /INSTALL oc/src/sgml/installation.sgml
Previous Message Tom Lane 2001-01-15 05:29:20 pgsql/src/backend/access/heap heapam.c tuptoas ...