diff options
author | Tom Lane | 2016-08-12 22:45:18 +0000 |
---|---|---|
committer | Tom Lane | 2016-08-12 22:45:18 +0000 |
commit | 499787819309293f3d2cd7219aee334a0e7d5069 (patch) | |
tree | a5dfc2f137d68cec7d957d14176b1f70cdbc4b1f /src | |
parent | 4b234fd8bf21cd6f5ff44f1f1c613bf40860998d (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/gram.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 0cae44641f..6a0f7b393c 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 |