From 179ac55e6ad7bdbfff3dda4c26c9a81933b98adf Mon Sep 17 00:00:00 2001 From: "David G. Johnston" Date: Thu, 9 Jun 2022 15:28:53 +0000 Subject: [PATCH] doc: Clarify the behavior of routines and explict extension membership --- doc/src/sgml/ref/alter_function.sgml | 7 +++++-- doc/src/sgml/ref/alter_procedure.sgml | 7 ++++++- doc/src/sgml/ref/drop_extension.sgml | 11 +++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/ref/alter_function.sgml b/doc/src/sgml/ref/alter_function.sgml index 0ee756a94d..08008f0391 100644 --- a/doc/src/sgml/ref/alter_function.sgml +++ b/doc/src/sgml/ref/alter_function.sgml @@ -160,8 +160,11 @@ ALTER FUNCTION name [ ( [ [ . + A function can depend upon multiple extensions, and will be dropped when + any one of those extensions is dropped. diff --git a/doc/src/sgml/ref/alter_procedure.sgml b/doc/src/sgml/ref/alter_procedure.sgml index 033fda92ee..bab7ac2743 100644 --- a/doc/src/sgml/ref/alter_procedure.sgml +++ b/doc/src/sgml/ref/alter_procedure.sgml @@ -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 that 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. diff --git a/doc/src/sgml/ref/drop_extension.sgml b/doc/src/sgml/ref/drop_extension.sgml index 5e507dec92..f2ca6aa5b7 100644 --- a/doc/src/sgml/ref/drop_extension.sgml +++ b/doc/src/sgml/ref/drop_extension.sgml @@ -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,10 @@ 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. + For each extension, refuse to drop anything if any objects (other than the + extensions listed) depend on it. However, its own member objects, and routines + that are explicitly dependent on this extension, are skipped. + This is the default. -- 2.25.1