@@ -2611,7 +2611,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
26112611 if they are inherited
26122612 from any parent tables. If you wish to remove a table and all of its
26132613 descendants, one easy way is to drop the parent table with the
2614- <literal>CASCADE</literal> option.
2614+ <literal>CASCADE</literal> option (see <xref linkend="ddl-depend">) .
26152615 </para>
26162616
26172617 <para>
@@ -3586,20 +3586,22 @@ HINT: Use DROP ... CASCADE to drop the dependent objects too.
35863586<screen>
35873587DROP TABLE products CASCADE;
35883588</screen>
3589- and all the dependent objects will be removed. In this case, it
3590- doesn't remove the orders table, it only removes the foreign key
3591- constraint. (If you want to check what <command>DROP ... CASCADE</> will do,
3589+ and all the dependent objects will be removed, as will any objects
3590+ that depend on them, recursively. In this case, it doesn't remove
3591+ the orders table, it only removes the foreign key constraint.
3592+ It stops there because nothing depends on the foreign key constraint.
3593+ (If you want to check what <command>DROP ... CASCADE</> will do,
35923594 run <command>DROP</> without <literal>CASCADE</> and read the
35933595 <literal>DETAIL</> output.)
35943596 </para>
35953597
35963598 <para>
3597- All <command>DROP</> commands in <productname>PostgreSQL</> support
3599+ Almost all <command>DROP</> commands in <productname>PostgreSQL</> support
35983600 specifying <literal>CASCADE</literal>. Of course, the nature of
35993601 the possible dependencies varies with the type of the object. You
36003602 can also write <literal>RESTRICT</literal> instead of
36013603 <literal>CASCADE</literal> to get the default behavior, which is to
3602- prevent the dropping of objects that other objects depend on.
3604+ prevent dropping objects that any other objects depend on.
36033605 </para>
36043606
36053607 <note>
@@ -3613,6 +3615,15 @@ DROP TABLE products CASCADE;
36133615 </para>
36143616 </note>
36153617
3618+ <para>
3619+ If a <command>DROP</> command lists multiple
3620+ objects, <literal>CASCADE</literal> is only required when there are
3621+ dependencies outside the specified group. For example, when saying
3622+ <literal>DROP TABLE tab1, tab2</literal> the existence of a foreign
3623+ key referencing <literal>tab1</> from <literal>tab2</> would not mean
3624+ that <literal>CASCADE</literal> is needed to succeed.
3625+ </para>
3626+
36163627 <para>
36173628 For user-defined functions, <productname>PostgreSQL</productname> tracks
36183629 dependencies associated with a function's externally-visible properties,
0 commit comments