diff options
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index d066b504d45..ab32fd88c59 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1,7 +1,7 @@ /********************************************************************** * plperl.c - perl as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.165 2010/02/12 19:35:25 adunstan Exp $ + * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.166 2010/02/14 18:42:18 rhaas Exp $ * **********************************************************************/ @@ -1198,9 +1198,7 @@ plperl_validator(PG_FUNCTION_ARGS) int i; /* Get the new function's pg_proc entry */ - tuple = SearchSysCache(PROCOID, - ObjectIdGetDatum(funcoid), - 0, 0, 0); + tuple = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcoid)); if (!HeapTupleIsValid(tuple)) elog(ERROR, "cache lookup failed for function %u", funcoid); proc = (Form_pg_proc) GETSTRUCT(tuple); @@ -1773,9 +1771,7 @@ compile_plperl_function(Oid fn_oid, bool is_trigger) ErrorContextCallback plperl_error_context; /* We'll need the pg_proc tuple in any case... */ - procTup = SearchSysCache(PROCOID, - ObjectIdGetDatum(fn_oid), - 0, 0, 0); + procTup = SearchSysCache1(PROCOID, ObjectIdGetDatum(fn_oid)); if (!HeapTupleIsValid(procTup)) elog(ERROR, "cache lookup failed for function %u", fn_oid); procStruct = (Form_pg_proc) GETSTRUCT(procTup); @@ -1867,9 +1863,8 @@ compile_plperl_function(Oid fn_oid, bool is_trigger) /************************************************************ * Lookup the pg_language tuple by Oid ************************************************************/ - langTup = SearchSysCache(LANGOID, - ObjectIdGetDatum(procStruct->prolang), - 0, 0, 0); + langTup = SearchSysCache1(LANGOID, + ObjectIdGetDatum(procStruct->prolang)); if (!HeapTupleIsValid(langTup)) { free(prodesc->proname); @@ -1887,9 +1882,9 @@ compile_plperl_function(Oid fn_oid, bool is_trigger) ************************************************************/ if (!is_trigger) { - typeTup = SearchSysCache(TYPEOID, - ObjectIdGetDatum(procStruct->prorettype), - 0, 0, 0); + typeTup = + SearchSysCache1(TYPEOID, + ObjectIdGetDatum(procStruct->prorettype)); if (!HeapTupleIsValid(typeTup)) { free(prodesc->proname); @@ -1948,9 +1943,8 @@ compile_plperl_function(Oid fn_oid, bool is_trigger) prodesc->nargs = procStruct->pronargs; for (i = 0; i < prodesc->nargs; i++) { - typeTup = SearchSysCache(TYPEOID, - ObjectIdGetDatum(procStruct->proargtypes.values[i]), - 0, 0, 0); + typeTup = SearchSysCache1(TYPEOID, + ObjectIdGetDatum(procStruct->proargtypes.values[i])); if (!HeapTupleIsValid(typeTup)) { free(prodesc->proname); |