Skip to content

sql: support CASCADE behavior for DROP OWNED BY command #55908

@angelapwen

Description

@angelapwen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-schema-changesA-sql-privilegesSQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions