Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
c9b128fc
Commit
c9b128fc
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Move funcid_get_rettype() to lsyscache.
parent
b1baf1ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/parser/parse_func.c
+3
-23
3 additions, 23 deletions
src/backend/parser/parse_func.c
with
3 additions
and
23 deletions
src/backend/parser/parse_func.c
+
3
−
23
View file @
c9b128fc
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.5
1
1999/08/
05
02:
33
:5
4
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.5
2
1999/08/
16
02:
08
:5
9
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -52,7 +52,6 @@ func_get_detail(char *funcname,
Oid
*
rettype
,
/* return value */
bool
*
retset
,
/* return value */
Oid
**
true_typeids
);
static
Oid
funcid_get_rettype
(
Oid
funcid
);
static
Oid
**
gen_cross_product
(
InhPaths
*
arginh
,
int
nargs
);
static
void
make_arguments
(
ParseState
*
pstate
,
int
nargs
,
...
...
@@ -629,25 +628,6 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
return
retval
;
}
static
Oid
funcid_get_rettype
(
Oid
funcid
)
{
HeapTuple
func_tuple
=
NULL
;
Oid
funcrettype
=
InvalidOid
;
func_tuple
=
SearchSysCacheTuple
(
PROOID
,
ObjectIdGetDatum
(
funcid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
func_tuple
))
elog
(
ERROR
,
"Function OID %u does not exist"
,
funcid
);
funcrettype
=
(
Oid
)
((
Form_pg_proc
)
GETSTRUCT
(
func_tuple
))
->
prorettype
;
return
funcrettype
;
}
/* func_get_candidates()
* get a list of all argument type vectors for which a function named
...
...
@@ -1378,7 +1358,7 @@ ParseComplexProjection(ParseState *pstate,
iter
=
(
Iter
*
)
first_arg
;
func
=
(
Func
*
)
((
Expr
*
)
iter
->
iterexpr
)
->
oper
;
argtype
=
func
id_get
_rettype
(
func
->
funcid
);
argtype
=
get_
func_rettype
(
func
->
funcid
);
argrelid
=
typeidTypeRelid
(
argtype
);
if
(
argrelid
&&
((
attnum
=
get_attnum
(
argrelid
,
funcname
))
...
...
@@ -1435,7 +1415,7 @@ ParseComplexProjection(ParseState *pstate,
break
;
funcnode
=
(
Func
*
)
expr
->
oper
;
argtype
=
func
id_get
_rettype
(
funcnode
->
funcid
);
argtype
=
get_
func_rettype
(
funcnode
->
funcid
);
argrelid
=
typeidTypeRelid
(
argtype
);
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment