Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
385d271b
Commit
385d271b
authored
May 19, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment additions in parser.
parent
5e987038
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/backend/parser/parse_func.c
src/backend/parser/parse_func.c
+9
-5
No files found.
src/backend/parser/parse_func.c
View file @
385d271b
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.10
7 2001/05/19 00:37:45
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.10
8 2001/05/19 01:57:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -106,6 +106,7 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
/*
* 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
...
...
@@ -115,6 +116,8 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
* In this case, Funcname is the part before parens, and fargs
* are the part in parens.
*
* FYI, projection is choosing column from a table.
*
*/
Node
*
ParseFuncOrColumn
(
ParseState
*
pstate
,
char
*
funcname
,
List
*
fargs
,
...
...
@@ -144,7 +147,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
/*
* Most of the rest of the parser just assumes that functions do
* not have more than FUNC_MAX_ARGS parameters. We have to test
* here to protect against array overruns, etc.
* here to protect against array overruns, etc. Of course, this
* may not be a function, but the test doesn't hurt.
*/
if
(
nargs
>
FUNC_MAX_ARGS
)
elog
(
ERROR
,
"Cannot pass more than %d arguments to a function"
,
...
...
@@ -158,6 +162,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
}
/*
* test for relation.column
*
* check for projection methods: if function takes one argument, and
* that argument is a relation, param, or PQ function returning a
* complex * type, then the function could be a projection.
...
...
@@ -170,9 +176,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
{
Ident
*
ident
=
(
Ident
*
)
first_arg
;
/*
* first arg is a relation. This could be a projection.
*/
/* First arg is a relation. This could be a projection. */
refname
=
ident
->
name
;
retval
=
qualifiedNameToVar
(
pstate
,
refname
,
funcname
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment