Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5fe2d4c

Browse files
committed
doc: clarify how dropping of extensions affects dependent objs.
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
1 parent 47ae694 commit 5fe2d4c

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

doc/src/sgml/ref/alter_function.sgml

+4-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param
160160
<para>
161161
This form marks the function as dependent on the extension, or no longer
162162
dependent on that extension if <literal>NO</literal> is specified.
163-
A function that's marked as dependent on an extension is automatically
164-
dropped when the extension is dropped.
163+
A function that's marked as dependent on an extension is dropped when the
164+
extension is dropped, even if <literal>CASCADE</literal> is not specified.
165+
A function can depend upon multiple extensions, and will be dropped when
166+
any one of those extensions is dropped.
165167
</para>
166168
</listitem>
167169
</varlistentry>

doc/src/sgml/ref/alter_procedure.sgml

+6-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,12 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
147147
<term><replaceable class="parameter">extension_name</replaceable></term>
148148
<listitem>
149149
<para>
150-
The name of the extension that the procedure is to depend on.
150+
This form marks the procedure as dependent on the extension, or no longer
151+
dependent on the extension if <literal>NO</literal> is specified.
152+
A procedure that's marked as dependent on an extension is dropped when the
153+
extension is dropped, even if cascade is not specified.
154+
A procedure can depend upon multiple extensions, and will be dropped when
155+
any one of those extensions is dropped.
151156
</para>
152157
</listitem>
153158
</varlistentry>

doc/src/sgml/ref/drop_extension.sgml

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [
3030

3131
<para>
3232
<command>DROP EXTENSION</command> removes extensions from the database.
33-
Dropping an extension causes its component objects to be dropped as well.
33+
Dropping an extension causes its component objects, and other explicitly
34+
dependent routines (see <xref linkend="sql-alterroutine"/>,
35+
the depends on extension action), to be dropped as well.
3436
</para>
3537

3638
<para>
@@ -77,9 +79,9 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [
7779
<term><literal>RESTRICT</literal></term>
7880
<listitem>
7981
<para>
80-
Refuse to drop the extension if any objects depend on it (other than
81-
its own member objects and other extensions listed in the same
82-
<command>DROP</command> command). This is the default.
82+
This option prevents the specified extensions from being dropped
83+
if there exists non-extension-member objects that depends on any
84+
the extensions. This is the default.
8385
</para>
8486
</listitem>
8587
</varlistentry>

0 commit comments

Comments
 (0)