-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support CASCADE behavior for DROP OWNED BY command #55908
Description
Background
Currently DROP TYPE and DROP SEQUENCE do not support the CASCADE option to recursively drop objects that depend on the affected objects, and in turn all objects that depend on those objects. The issues are tracked in #20965 and #51480.
Current Issue
DROP OWNED BY support, tracked in #55381, should also allow for CASCADE behavior in all objects owned by a specific role. The current implementation (in progress) for DROP OWNED BY will only support the default behavior, which is RESTRICT, which will refuse to drop the objects owned by a role if any other database objects depend on one of the affected objects. We cannot support CASCADE for DROP OWNED BY until the appropriate implementation for types and sequences is complete.
Postgres docs for the command: https://www.postgresql.org/docs/current/sql-drop-owned.html
Jira issue: CRDB-3615
Epic CRDB-60816