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
b1baf1ff
Commit
b1baf1ff
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Add get_func_rettype() to general-use lsyscache routines,
since it's now needed in both optimizer and parser.
parent
bab13a70
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/utils/cache/lsyscache.c
+27
-1
27 additions, 1 deletion
src/backend/utils/cache/lsyscache.c
src/include/utils/lsyscache.h
+2
-1
2 additions, 1 deletion
src/include/utils/lsyscache.h
with
29 additions
and
2 deletions
src/backend/utils/cache/lsyscache.c
+
27
−
1
View file @
b1baf1ff
...
...
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.3
2
1999/08/
09 03:13:30
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.3
3
1999/08/
16 02:06:25
tgl Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
...
...
@@ -15,6 +15,7 @@
#include
"postgres.h"
#include
"catalog/pg_operator.h"
#include
"catalog/pg_proc.h"
#include
"catalog/pg_type.h"
#include
"utils/lsyscache.h"
#include
"utils/syscache.h"
...
...
@@ -453,6 +454,31 @@ get_oprjoin(Oid opno)
return
(
RegProcedure
)
NULL
;
}
/* ---------- FUNCTION CACHE ---------- */
/*
* get_func_rettype
* Given procedure id, return the function's result type.
*/
Oid
get_func_rettype
(
Oid
funcid
)
{
HeapTuple
func_tuple
;
Oid
funcrettype
;
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
;
}
/* ---------- RELATION CACHE ---------- */
/*
...
...
This diff is collapsed.
Click to expand it.
src/include/utils/lsyscache.h
+
2
−
1
View file @
b1baf1ff
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: lsyscache.h,v 1.
19
1999/08/
09 03:13
:2
8
tgl Exp $
* $Id: lsyscache.h,v 1.
20
1999/08/
16 02:06
:2
3
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -32,6 +32,7 @@ extern HeapTuple get_operator_tuple(Oid opno);
extern
Oid
get_negator
(
Oid
opid
);
extern
RegProcedure
get_oprrest
(
Oid
opid
);
extern
RegProcedure
get_oprjoin
(
Oid
opid
);
extern
Oid
get_func_rettype
(
Oid
funcid
);
extern
int
get_relnatts
(
Oid
relid
);
extern
char
*
get_rel_name
(
Oid
relid
);
extern
struct
varlena
*
get_relstub
(
Oid
relid
,
int
no
,
bool
*
islast
);
...
...
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