aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-07-29 12:06:18 -0400
committerRobert Haas <rhaas@postgresql.org>2016-07-29 12:06:18 -0400
commit3153b1a52f8f2d1efe67306257aec15aaaf9e94c (patch)
tree132293052734c4456755fb5308f7a498a0742534 /src/backend/utils/adt/ruleutils.c
parent5676da2d01bb6ba437cf05d748f04b3d31676922 (diff)
downloadpostgresql-3153b1a52f8f2d1efe67306257aec15aaaf9e94c.tar.gz
postgresql-3153b1a52f8f2d1efe67306257aec15aaaf9e94c.zip
Eliminate a few more user-visible "cache lookup failed" errors.
Michael Paquier
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r--src/backend/utils/adt/ruleutils.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 51c765ad877..80f0def75d5 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -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))