Re: Add tests for UNBOUNDED syntax ambiguity

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add tests for UNBOUNDED syntax ambiguity
Date: 2021-06-24 13:42:20
Message-ID: 036df227-8481-68c3-915f-875566df90fb@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24/06/2021 12:01, Peter Eisentraut wrote:
> As many will be aware, there is a syntactic ambiguity in the SQL
> standard regarding the keyword UNBOUNDED. Since UNBOUNDED is a
> non-reserved word, it could be the name of a function parameter and be
> used as an expression. There is a grammar hack to resolve such cases as
> the keyword.
>
> I brought this issue to the SQL standard working group, and a fix has
> been agreed. (Since long-standing syntax obviously can't be changed,
> the fix is basically just an additional rule saying, "if you see this,
> it means the keyword".)

Nice!

> While working on that, I wrote a few test cases to explore this and
> check how PostgreSQL actually handles this. I figure these test
> cases are worth committing so that we have a record of this and
> future grammar refactorings can maintain the behavior.

+1

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2021-06-24 14:03:39 Relaxing COPY FREEZE restrictions
Previous Message Heikki Linnakangas 2021-06-24 13:28:48 Re: Using each rel as both outer and inner for JOIN_ANTI