11
11
*
12
12
*
13
13
* IDENTIFICATION
14
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.191 2000/09/19 18:17:55 petere Exp $
14
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.192 2000/09/25 18:38:39 tgl Exp $
15
15
*
16
16
* HISTORY
17
17
* AUTHORDATEMAJOR EVENT
@@ -3751,6 +3751,10 @@ from_list: from_list ',' table_ref{ $$ = lappend($1, $3); }
3751
3751
* between table_ref := '(' joined_table ')' alias_clause
3752
3752
* and joined_table := '(' joined_table ')'. So, we must have the
3753
3753
* redundant-looking productions here instead.
3754
+ *
3755
+ * Note that the SQL spec does not permit a subselect (<derived_table>)
3756
+ * without an alias clause, so we don't either. This avoids the problem
3757
+ * of needing to invent a refname for an unlabeled subselect.
3754
3758
*/
3755
3759
table_ref :relation_expr
3756
3760
{
@@ -3761,13 +3765,6 @@ table_ref: relation_expr
3761
3765
$1 ->name =$2 ;
3762
3766
$$ = (Node *)$1 ;
3763
3767
}
3764
- | ' (' select_clause ' )'
3765
- {
3766
- RangeSubselect *n = makeNode(RangeSubselect);
3767
- n->subquery =$2 ;
3768
- n->name =NULL ;
3769
- $$ = (Node *) n;
3770
- }
3771
3768
| ' (' select_clause ' )' alias_clause
3772
3769
{
3773
3770
RangeSubselect *n = makeNode(RangeSubselect);