mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
New comment. This func/column things has always confused me.
/* * parse function * This code is confusing because the database can accept * relation.column, column.function, or relation.column.function. * In these cases, funcname is the last parameter, and fargs are * the rest. * * It can also be called as func(col) or func(col,col). * In this case, Funcname is the part before parens, and fargs * are the part in parens. * */ Node * ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, bool agg_star, bool agg_distinct, int precedence)
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.94 2001/05/18 22:35:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.95 2001/05/19 00:33:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -173,7 +173,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
a->lexpr,
|
||||
precedence);
|
||||
|
||||
result = ParseColumnOrFunc(pstate,
|
||||
result = ParseFuncOrColumn(pstate,
|
||||
"nullvalue",
|
||||
makeList1(lexpr),
|
||||
false, false,
|
||||
@ -186,7 +186,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
a->lexpr,
|
||||
precedence);
|
||||
|
||||
result = ParseColumnOrFunc(pstate,
|
||||
result = ParseFuncOrColumn(pstate,
|
||||
"nonnullvalue",
|
||||
makeList1(lexpr),
|
||||
false, false,
|
||||
@ -273,7 +273,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
lfirst(args) = transformExpr(pstate,
|
||||
(Node *) lfirst(args),
|
||||
precedence);
|
||||
result = ParseColumnOrFunc(pstate,
|
||||
result = ParseFuncOrColumn(pstate,
|
||||
fn->funcname,
|
||||
fn->args,
|
||||
fn->agg_star,
|
||||
|
Reference in New Issue
Block a user