summaryrefslogtreecommitdiff
path: root/src/include/fmgr.h
diff options
context:
space:
mode:
authorTom Lane2017-04-15 03:50:16 +0000
committerTom Lane2017-04-15 03:50:16 +0000
commit32470825d36d99a81347ee36c181d609c952c061 (patch)
tree0fe8bfc11dbb20ae8dfe943632674cd3bc859b79 /src/include/fmgr.h
parent5a617ab3e691aec56725960e6d28c98c8af6ddaa (diff)
Avoid passing function pointers across process boundaries.
We'd already recognized that we can't pass function pointers across process boundaries for functions in loadable modules, since a shared library could get loaded at different addresses in different processes. But actually the practice doesn't work for functions in the core backend either, if we're using EXEC_BACKEND. This is the cause of recent failures on buildfarm member culicidae. Switch to passing a string function name in all cases. Something like this needs to be back-patched into 9.6, but let's see if the buildfarm likes it first. Petr Jelinek, with a bunch of basically-cosmetic adjustments by me Discussion: https://postgr.es/m/548f9c1d-eafa-e3fa-9da8-f0cc2f654e60@2ndquadrant.com
Diffstat (limited to 'src/include/fmgr.h')
-rw-r--r--src/include/fmgr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 0c695e246a5..cfb7b7774df 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -657,7 +657,7 @@ extern bytea *OidSendFunctionCall(Oid functionId, Datum val);
/*
* Routines in fmgr.c
*/
-extern const Pg_finfo_record *fetch_finfo_record(void *filehandle, char *funcname);
+extern const Pg_finfo_record *fetch_finfo_record(void *filehandle, const char *funcname);
extern void clear_external_function_hash(void *filehandle);
extern Oid fmgr_internal_function(const char *proname);
extern Oid get_fn_expr_rettype(FmgrInfo *flinfo);
@@ -673,9 +673,9 @@ extern bool CheckFunctionValidatorAccess(Oid validatorOid, Oid functionOid);
*/
extern char *Dynamic_library_path;
-extern PGFunction load_external_function(char *filename, char *funcname,
+extern PGFunction load_external_function(const char *filename, const char *funcname,
bool signalNotFound, void **filehandle);
-extern PGFunction lookup_external_function(void *filehandle, char *funcname);
+extern PGFunction lookup_external_function(void *filehandle, const char *funcname);
extern void load_file(const char *filename, bool restricted);
extern void **find_rendezvous_variable(const char *varName);
extern Size EstimateLibraryStateSpace(void);