Skip to content

Commit 5758d5e

Browse files
committed
Use relation_expr for TABLE command, requested by Tom.
1 parent 3d7ac0d commit 5758d5e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

doc/src/sgml/ref/select.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.110 2008/11/20 14:04:45 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.111 2008/11/21 11:47:55 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -59,7 +59,7 @@ and <replaceable class="parameter">with_query</replaceable> is:
5959

6060
<replaceable class="parameter">with_query_name</replaceable> [ ( <replaceable class="parameter">column_name</replaceable> [, ...] ) ] AS ( <replaceable class="parameter">select</replaceable> )
6161

62-
TABLE <replaceable class="parameter">table_name</replaceable> | <replaceable class="parameter">with_query_name</replaceable>
62+
TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] | <replaceable class="parameter">with_query_name</replaceable>
6363
</synopsis>
6464

6565
</refsynopsisdiv>

src/backend/parser/gram.y

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.638 2008/11/20 14:04:46 petere Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.639 2008/11/21 11:47:55 petere Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -6431,9 +6431,9 @@ simple_select:
64316431
$$ = (Node *)n;
64326432
}
64336433
| values_clause { $$ = $1; }
6434-
| TABLE qualified_name
6434+
| TABLE relation_expr
64356435
{
6436-
/* same as SELECT * FROM qualified_name */
6436+
/* same as SELECT * FROM relation_expr */
64376437
ColumnRef *cr = makeNode(ColumnRef);
64386438
ResTarget *rt = makeNode(ResTarget);
64396439
SelectStmt *n = makeNode(SelectStmt);
@@ -6446,9 +6446,6 @@ simple_select:
64466446
rt->val = (Node *)cr;
64476447
rt->location = -1;
64486448

6449-
$2->inhOpt = INH_DEFAULT;
6450-
$2->alias = NULL;
6451-
64526449
n->targetList = list_make1(rt);
64536450
n->fromClause = list_make1($2);
64546451
$$ = (Node *)n;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy