Recursive query syntax ambiguity

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Recursive query syntax ambiguity
Date: 2007-01-26 17:41:26
Message-ID: 87ejphado9.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Woah, I just realized it's much worse than that. I think the syntax in the
ANSI is not parsable in LALR(1) at all. Note the following:

WITH RECURSIVE foo (a,b) AS (subq) SEARCH BREADTH FIRST BY a,b,c(x,z),d(y,z) AS (subq) SELECT ...

To determine whether "c" is the name of a new <with list element> it has to
scan as far ahead as the "," before the "d". Note that "d" here is in fact not
part of the <search clause> at all, it's the name of a second <with list
element>.

bleagh.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2007-01-26 17:43:54 Re: Proposal: Snapshot cloning
Previous Message Jan Wieck 2007-01-26 17:39:28 Re: Proposal: Snapshot cloning