mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Eliminate a few more user-visible "cache lookup failed" errors.
Michael Paquier
This commit is contained in:
@ -2238,11 +2238,11 @@ pg_get_function_arguments(PG_FUNCTION_ARGS)
|
||||
StringInfoData buf;
|
||||
HeapTuple proctup;
|
||||
|
||||
initStringInfo(&buf);
|
||||
|
||||
proctup = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
|
||||
if (!HeapTupleIsValid(proctup))
|
||||
elog(ERROR, "cache lookup failed for function %u", funcid);
|
||||
PG_RETURN_NULL();
|
||||
|
||||
initStringInfo(&buf);
|
||||
|
||||
(void) print_function_arguments(&buf, proctup, false, true);
|
||||
|
||||
@ -2264,11 +2264,11 @@ pg_get_function_identity_arguments(PG_FUNCTION_ARGS)
|
||||
StringInfoData buf;
|
||||
HeapTuple proctup;
|
||||
|
||||
initStringInfo(&buf);
|
||||
|
||||
proctup = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
|
||||
if (!HeapTupleIsValid(proctup))
|
||||
elog(ERROR, "cache lookup failed for function %u", funcid);
|
||||
PG_RETURN_NULL();
|
||||
|
||||
initStringInfo(&buf);
|
||||
|
||||
(void) print_function_arguments(&buf, proctup, false, false);
|
||||
|
||||
@ -2289,11 +2289,11 @@ pg_get_function_result(PG_FUNCTION_ARGS)
|
||||
StringInfoData buf;
|
||||
HeapTuple proctup;
|
||||
|
||||
initStringInfo(&buf);
|
||||
|
||||
proctup = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
|
||||
if (!HeapTupleIsValid(proctup))
|
||||
elog(ERROR, "cache lookup failed for function %u", funcid);
|
||||
PG_RETURN_NULL();
|
||||
|
||||
initStringInfo(&buf);
|
||||
|
||||
print_function_rettype(&buf, proctup);
|
||||
|
||||
@ -2547,7 +2547,7 @@ pg_get_function_arg_default(PG_FUNCTION_ARGS)
|
||||
|
||||
proctup = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
|
||||
if (!HeapTupleIsValid(proctup))
|
||||
elog(ERROR, "cache lookup failed for function %u", funcid);
|
||||
PG_RETURN_NULL();
|
||||
|
||||
numargs = get_func_arg_info(proctup, &argtypes, &argnames, &argmodes);
|
||||
if (nth_arg < 1 || nth_arg > numargs || !is_input_argument(nth_arg - 1, argmodes))
|
||||
|
Reference in New Issue
Block a user