From 5758d5ea310e52ce0a589683d27fcf8d5e25b792 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 21 Nov 2008 11:47:55 +0000 Subject: [PATCH] Use relation_expr for TABLE command, requested by Tom. --- doc/src/sgml/ref/select.sgml | 4 ++-- src/backend/parser/gram.y | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 68ec391238..ea3c60a3ee 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ @@ -59,7 +59,7 @@ and with_query is: with_query_name [ ( column_name [, ...] ) ] AS ( select ) -TABLE table_name | with_query_name +TABLE [ ONLY ] table_name [ * ] | with_query_name diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 6733372da2..eaf72f7026 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.638 2008/11/20 14:04:46 petere Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.639 2008/11/21 11:47:55 petere Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -6431,9 +6431,9 @@ simple_select: $$ = (Node *)n; } | values_clause { $$ = $1; } - | TABLE qualified_name + | TABLE relation_expr { - /* same as SELECT * FROM qualified_name */ + /* same as SELECT * FROM relation_expr */ ColumnRef *cr = makeNode(ColumnRef); ResTarget *rt = makeNode(ResTarget); SelectStmt *n = makeNode(SelectStmt); @@ -6446,9 +6446,6 @@ simple_select: rt->val = (Node *)cr; rt->location = -1; - $2->inhOpt = INH_DEFAULT; - $2->alias = NULL; - n->targetList = list_make1(rt); n->fromClause = list_make1($2); $$ = (Node *)n; -- 2.40.0