Skip to content

Commit ef9d0cf

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 2d4c643 commit ef9d0cf

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

doc/src/sgml/ref/alter_function.sgml

Lines changed: 4 additions & 2 deletions
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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
144144
<term><replaceable class="parameter">extension_name</replaceable></term>
145145
<listitem>
146146
<para>
147-
The name of the extension that the procedure is to depend on.
147+
This form marks the procedure as dependent on the extension, or no longer
148+
dependent on the extension if <literal>NO</literal> is specified.
149+
A procedure that's marked as dependent on an extension is dropped when the
150+
extension is dropped, even if cascade is not specified.
151+
A procedure can depend upon multiple extensions, and will be dropped when
152+
any one of those extensions is dropped.
148153
</para>
149154
</listitem>
150155
</varlistentry>

doc/src/sgml/ref/drop_extension.sgml

Lines changed: 6 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy