1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

Come to think of it, functions in FROM have the same syntactic restriction

as CREATE INDEX did, and can be fixed the same way, for another small
improvement in usability and reduction in grammar size.
This commit is contained in:
Tom Lane
2004-09-30 00:24:27 +00:00
parent 912c27f9c2
commit f065957062
4 changed files with 26 additions and 51 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.136 2004/08/29 05:06:44 momjian Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.137 2004/09/30 00:24:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -497,12 +497,16 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
RangeTblEntry *rte;
RangeTblRef *rtr;
/* Get function name for possible use as alias */
Assert(IsA(r->funccallnode, FuncCall));
funcname = strVal(llast(((FuncCall *) r->funccallnode)->funcname));
/*
* Get function name for possible use as alias. We use the same
* transformation rules as for a SELECT output expression. For a
* FuncCall node, the result will be the function name, but it is
* possible for the grammar to hand back other node types.
*/
funcname = FigureColname(r->funccallnode);
/*
* Transform the raw FuncCall node.
* Transform the raw expression.
*/
funcexpr = transformExpr(pstate, r->funccallnode);