PostgreSQL 17 runners are live
All rules

SDB902[info]Engine

Dynamic SQL not analysed statically

DO blocks and EXECUTE strings can't be checked before running.

Why it's risky in PostgreSQL

Static rules can't see inside dynamic SQL. Execution evidence (locks, rewrites, timing) still applies.

What triggers it, and the safer way

unsafe.sql
DO $$ BEGIN EXECUTE 'ALTER TABLE ' || 'orders ADD COLUMN x int'; END $$;
safer.sql
ALTER TABLE orders ADD COLUMN x int;

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 SDB902 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.