diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-06 02:58:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-06 02:58:40 +0000 |
commit | 869312e65e380d813c5eb43128074515949cecdf (patch) | |
tree | 52f460bbca41bb0d7d8669b1d3f824fda6941576 /src | |
parent | 9298d2ff3913de89b58065f7a444cba48e9c5d93 (diff) | |
download | postgresql-869312e65e380d813c5eb43128074515949cecdf.tar.gz postgresql-869312e65e380d813c5eb43128074515949cecdf.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/gram.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 280443074f5..06499fa9bc9 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.666 2009/07/06 02:58:40 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, |