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
b1baf1ff
Commit
b1baf1ff
authored
Aug 16, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add get_func_rettype() to general-use lsyscache routines,
since it's now needed in both optimizer and parser.
parent
bab13a70
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/lsyscache.c
+27
-1
src/include/utils/lsyscache.h
src/include/utils/lsyscache.h
+2
-1
No files found.
src/backend/utils/cache/lsyscache.c
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 ---------- */
/*
...
...
src/include/utils/lsyscache.h
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:28
tgl Exp $
* $Id: lsyscache.h,v 1.
20 1999/08/16 02:06:23
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
);
...
...
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