aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/injection_point.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-01-23 10:45:00 +0900
committerMichael Paquier <michael@paquier.xyz>2024-01-23 10:45:00 +0900
commitcdd863480c27b406ac14e94f1fe122b98ea562b4 (patch)
tree1fff1ef8364b7ef04e1856a795020873ecc9f3f9 /src/backend/utils/misc/injection_point.c
parent0eb23285a2579591c09a591e5a52829f65665341 (diff)
downloadpostgresql-cdd863480c27b406ac14e94f1fe122b98ea562b4.tar.gz
postgresql-cdd863480c27b406ac14e94f1fe122b98ea562b4.zip
Fix ERROR message in injection_point.c
This commit fixes an error message that failed to show the correct function and library names when a function cannot be loaded. While on it, adjust the call to load_external_function() so as this ERROR can be reached, by making load_external_function() return NULL rather than fail if a function cannot be found for a given injection point. Thinkos in d86d20f0ba79.
Diffstat (limited to 'src/backend/utils/misc/injection_point.c')
-rw-r--r--src/backend/utils/misc/injection_point.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/misc/injection_point.c b/src/backend/utils/misc/injection_point.c
index 4f52f198533..0cf4d51cac4 100644
--- a/src/backend/utils/misc/injection_point.c
+++ b/src/backend/utils/misc/injection_point.c
@@ -300,11 +300,11 @@ InjectionPointRun(const char *name)
path, name);
injection_callback = (InjectionPointCallback)
- load_external_function(path, entry_by_name->function, true, NULL);
+ load_external_function(path, entry_by_name->function, false, NULL);
if (injection_callback == NULL)
elog(ERROR, "could not find function \"%s\" in library \"%s\" for injection point \"%s\"",
- name, entry_by_name->function, path);
+ entry_by_name->function, path, name);
/* add it to the local cache when found */
injection_point_cache_add(name, injection_callback);