From: Tom Lane Date: Mon, 6 Jul 2009 02:58:48 +0000 (+0000) Subject: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow X-Git-Tag: REL8_4_1~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0f6725090e8c65434666ec8d848b19ac6024292;p=postgresql Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow parentheses around the 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. --- diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 280443074f..de6734dfd7 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * 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.665.2.1 2009/07/06 02:58:48 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -6879,7 +6879,7 @@ select_no_parens: NULL); $$ = $1; } - | with_clause simple_select + | with_clause select_clause { insertSelectOptions((SelectStmt *) $2, NULL, NIL, NULL, NULL,