88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.107 2001/05/1900:37:45 momjian Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.108 2001/05/1901:57:11 momjian Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -106,6 +106,7 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
106106
107107/*
108108 * parse function
109+ *
109110 * This code is confusing because the database can accept
110111 * relation.column, column.function, or relation.column.function.
111112 *In these cases, funcname is the last parameter, and fargs are
@@ -115,6 +116,8 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
115116 * In this case, Funcname is the part before parens, and fargs
116117 * are the part in parens.
117118 *
119+ *FYI, projection is choosing column from a table.
120+ *
118121 */
119122Node *
120123ParseFuncOrColumn (ParseState * pstate ,char * funcname ,List * fargs ,
@@ -144,7 +147,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
144147/*
145148 * Most of the rest of the parser just assumes that functions do
146149 * not have more than FUNC_MAX_ARGS parameters. We have to test
147- * here to protect against array overruns, etc.
150+ * here to protect against array overruns, etc. Of course, this
151+ * may not be a function, but the test doesn't hurt.
148152 */
149153if (nargs > FUNC_MAX_ARGS )
150154elog (ERROR ,"Cannot pass more than %d arguments to a function" ,
@@ -158,6 +162,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
158162}
159163
160164/*
165+ * test for relation.column
166+ *
161167 * check for projection methods: if function takes one argument, and
162168 * that argument is a relation, param, or PQ function returning a
163169 * complex * type, then the function could be a projection.
@@ -170,9 +176,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
170176{
171177Ident * ident = (Ident * )first_arg ;
172178
173- /*
174- * first arg is a relation. This could be a projection.
175- */
179+ /* First arg is a relation. This could be a projection. */
176180refname = ident -> name ;
177181
178182retval = qualifiedNameToVar (pstate ,refname ,funcname , true);