From 57710f39cc55cba1e98c718300a811aadacec7c5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 3 Sep 2009 22:11:13 +0000 Subject: Make LOAD of an already-loaded library into a no-op, instead of attempting to unload and re-load the library. The difficulty with unloading a library is that we haven't defined safe protocols for doing so. In particular, there's no safe mechanism for getting out of a "hook" function pointer unless libraries are unloaded in reverse order of loading. And there's no mechanism at all for undefining a custom GUC variable, so GUC would be left with a pointer to an old value that might or might not still be valid, and very possibly wouldn't be in the same place anymore. While the unload and reload behavior had some usefulness in easing development of new loadable libraries, it's of no use whatever to normal users, so just disabling it isn't giving up that much. Someday we might care to expend the effort to develop safe unload protocols; but even if we did, there'd be little certainty that every third-party loadable module was following them, so some security restrictions would still be needed. Back-patch to 8.2; before that, LOAD was superuser-only anyway. Security: unprivileged users could crash backend. CVE not assigned yet --- doc/src/sgml/ref/create_function.sgml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/src/sgml/ref/create_function.sgml') diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index ca9eca5138d..0c35ded26c9 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -1,5 +1,5 @@ @@ -528,8 +528,7 @@ CREATE FUNCTION foo(int, int default 42) ... When repeated CREATE FUNCTION calls refer to the same object file, the file is only loaded once per session. To unload and - reload the file (perhaps during development), use the command. + reload the file (perhaps during development), start a new session. -- cgit v1.2.3