mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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 d86d20f0ba.
			
			
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user