Commit 869312e6 authored by Tom Lane's avatar Tom Lane

Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow

parentheses around the <query expression body> that follows a WITH clause, eg
	with cte(foo) as ( values(0) ) ((select foo from cte));
This seems to be just an oversight/thinko in gram.y.  Noted while
experimenting with bug #4902.
parent 9298d2ff
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.665 2009/06/18 01:27:02 tgl Exp $ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.666 2009/07/06 02:58:40 tgl Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -6879,7 +6879,7 @@ select_no_parens: ...@@ -6879,7 +6879,7 @@ select_no_parens:
NULL); NULL);
$$ = $1; $$ = $1;
} }
| with_clause simple_select | with_clause select_clause
{ {
insertSelectOptions((SelectStmt *) $2, NULL, NIL, insertSelectOptions((SelectStmt *) $2, NULL, NIL,
NULL, NULL, NULL, NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment