Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c9b128f

Browse files
committed
Move funcid_get_rettype() to lsyscache.
1 parent b1baf1f commit c9b128f

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

src/backend/parser/parse_func.c

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.51 1999/08/05 02:33:54 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.52 1999/08/16 02:08:59 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -52,7 +52,6 @@ func_get_detail(char *funcname,
5252
Oid *rettype, /* return value */
5353
bool *retset, /* return value */
5454
Oid **true_typeids);
55-
static Oid funcid_get_rettype(Oid funcid);
5655
static Oid **gen_cross_product(InhPaths *arginh, int nargs);
5756
static void make_arguments(ParseState *pstate,
5857
int nargs,
@@ -629,25 +628,6 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
629628
return retval;
630629
}
631630

632-
static Oid
633-
funcid_get_rettype(Oid funcid)
634-
{
635-
HeapTuple func_tuple = NULL;
636-
Oid funcrettype = InvalidOid;
637-
638-
func_tuple = SearchSysCacheTuple(PROOID,
639-
ObjectIdGetDatum(funcid),
640-
0, 0, 0);
641-
642-
if (!HeapTupleIsValid(func_tuple))
643-
elog(ERROR, "Function OID %u does not exist", funcid);
644-
645-
funcrettype = (Oid)
646-
((Form_pg_proc) GETSTRUCT(func_tuple))->prorettype;
647-
648-
return funcrettype;
649-
}
650-
651631

652632
/* func_get_candidates()
653633
* get a list of all argument type vectors for which a function named
@@ -1378,7 +1358,7 @@ ParseComplexProjection(ParseState *pstate,
13781358

13791359
iter = (Iter *) first_arg;
13801360
func = (Func *) ((Expr *) iter->iterexpr)->oper;
1381-
argtype = funcid_get_rettype(func->funcid);
1361+
argtype = get_func_rettype(func->funcid);
13821362
argrelid = typeidTypeRelid(argtype);
13831363
if (argrelid &&
13841364
((attnum = get_attnum(argrelid, funcname))
@@ -1435,7 +1415,7 @@ ParseComplexProjection(ParseState *pstate,
14351415
break;
14361416

14371417
funcnode = (Func *) expr->oper;
1438-
argtype = funcid_get_rettype(funcnode->funcid);
1418+
argtype = get_func_rettype(funcnode->funcid);
14391419
argrelid = typeidTypeRelid(argtype);
14401420

14411421
/*

0 commit comments

Comments
 (0)