doc: clarify how dropping of extensions affects dependent objs.
authorBruce Momjian
Thu, 14 Jul 2022 21:41:03 +0000 (17:41 -0400)
committerBruce Momjian
Thu, 14 Jul 2022 21:41:03 +0000 (17:41 -0400)
Clarify that functions/procedures are dropped when any extension that
depends on them is dropped.

Reported-by: David G. Johnston
Discussion: https://postgr.es/m/CAKFQuwbPSHMDGkisRUmewopweC1bFvytVqB=a=X4GFg=4ZWxPA@mail.gmail.com

Backpatch-through: 13

doc/src/sgml/ref/alter_function.sgml
doc/src/sgml/ref/alter_procedure.sgml
doc/src/sgml/ref/drop_extension.sgml

index 0ee756a94d9265680e5c2cdf1a235fd3bd82f7aa..2e8e1162d821b5b489c9c7af9500c44946cf2827 100644 (file)
@@ -160,8 +160,10 @@ ALTER FUNCTION name [ ( [ [ 
      
       This form marks the function as dependent on the extension, or no longer
       dependent on that extension if NO is specified.
-      A function that's marked as dependent on an extension is automatically
-      dropped when the extension is dropped.
+      A function that's marked as dependent on an extension is dropped when the
+      extension is dropped, even if CASCADE is not specified.
+      A function can depend upon multiple extensions, and will be dropped when
+      any one of those extensions is dropped.
      
     
    
index 033fda92ee5151666317fff802ca806deb332685..20a623885f7468aad5c4f1452ae47557a962f8fd 100644 (file)
@@ -147,7 +147,12 @@ ALTER PROCEDURE name [ ( [ [ 
     extension_name
     
      
-      The name of the extension that the procedure is to depend on.
+      This form marks the procedure as dependent on the extension, or no longer
+      dependent on the extension if NO is specified.
+      A procedure that's marked as dependent on an extension is dropped when the
+      extension is dropped, even if cascade is not specified.
+      A procedure can depend upon multiple extensions, and will be dropped when
+      any one of those extensions is dropped.
      
     
    
index 5e507dec92843f11e6c3dd4f01aef5cfcab1e00a..c01ddace84c70793849b5770388422166b3d143a 100644 (file)
@@ -30,7 +30,9 @@ DROP EXTENSION [ IF EXISTS ] name [
 
   
    DROP EXTENSION removes extensions from the database.
-   Dropping an extension causes its component objects to be dropped as well.
+   Dropping an extension causes its component objects, and other explicitly
+   dependent routines (see ,
+   the depends on extension action), to be dropped as well.
   
 
   
@@ -77,9 +79,9 @@ DROP EXTENSION [ IF EXISTS ] name [
     RESTRICT
     
      
-      Refuse to drop the extension if any objects depend on it (other than
-      its own member objects and other extensions listed in the same
-      DROP command).  This is the default.
+      This option prevents the specified extensions from being dropped
+      if there exists non-extension-member objects that depends on any
+      the extensions.  This is the default.