Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit385d271

Browse files
committed
Comment additions in parser.
1 parent5e98703 commit385d271

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

‎src/backend/parser/parse_func.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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
*/
119122
Node*
120123
ParseFuncOrColumn(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
*/
149153
if (nargs>FUNC_MAX_ARGS)
150154
elog(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
{
171177
Ident*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. */
176180
refname=ident->name;
177181

178182
retval=qualifiedNameToVar(pstate,refname,funcname, true);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp