From 499787819309293f3d2cd7219aee334a0e7d5069 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 12 Aug 2016 18:45:18 -0400 Subject: Doc: clarify that DROP ... CASCADE is recursive. Apparently that's not obvious to everybody, so let's belabor the point. In passing, document that DROP POLICY has CASCADE/RESTRICT options (which it does, per gram.y) but they do nothing (I assume, anyway). Also update some long-obsolete commentary in gram.y. Discussion: <20160805104837.1412.84915@wrigleys.postgresql.org> --- src/backend/parser/gram.y | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 0cae44641f8..6a0f7b393cb 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -1126,9 +1126,9 @@ AlterUserSetStmt: * * Drop a postgresql DBMS role * - * XXX Ideally this would have CASCADE/RESTRICT options, but since a role - * might own objects in multiple databases, there is presently no way to - * implement either cascading or restricting. Caveat DBA. + * XXX Ideally this would have CASCADE/RESTRICT options, but a role + * might own objects in multiple databases, and there is presently no way to + * implement cascading to other databases. So we always behave as RESTRICT. *****************************************************************************/ DropRoleStmt: @@ -1152,9 +1152,7 @@ DropRoleStmt: * * Drop a postgresql DBMS user * - * XXX Ideally this would have CASCADE/RESTRICT options, but since a user - * might own objects in multiple databases, there is presently no way to - * implement either cascading or restricting. Caveat DBA. + * XXX As with DROP ROLE, no CASCADE/RESTRICT here. *****************************************************************************/ DropUserStmt: @@ -1220,7 +1218,7 @@ add_drop: ADD_P { $$ = +1; } * * Drop a postgresql group * - * XXX see above notes about cascading DROP USER; groups have same problem. + * XXX As with DROP ROLE, no CASCADE/RESTRICT here. *****************************************************************************/ DropGroupStmt: @@ -4574,6 +4572,8 @@ auth_ident: RoleSpec { $$ = $1; } * QUERY : * DROP USER MAPPING FOR auth_ident SERVER name * + * XXX you'd think this should have a CASCADE/RESTRICT option, even if it's + * only pro forma; but the SQL standard doesn't show one. ****************************************************************************/ DropUserMappingStmt: DROP USER MAPPING FOR auth_ident SERVER name -- cgit v1.2.3