PostgreSQL 17 runners are live
All rules

SDB103[critical]Destructive

Schema dropped

Dropping a schema removes every object inside it.

Why it's risky in PostgreSQL

DROP SCHEMA … CASCADE removes tables, views, functions and types in one statement. A typo here is unrecoverable without a backup.

What triggers it, and the safer way

unsafe.sql
DROP SCHEMA reporting CASCADE;
safer.sql
-- Drop the objects you intend to remove explicitly, one by one, each reviewed:
-- shadowdb:allow SDB113 report view retired in release 40
DROP VIEW reporting.daily_totals;

Suppress it when you're sure

Put this comment on the line before the statement. The reason is required and shows in the report.

suppression
-- shadowdb:allow SDB103 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.