PostgreSQL 17 runners are live
All rules

FRN815[medium]Application queries

Watched query reads a changed object

A registered query still prepares, but a column or view it reads changed type, nullability, default or definition.

Why it's risky in PostgreSQL

PostgreSQL accepts the query after the migrations, but the application may not: a column that is now numeric instead of integer, or nullable, or a view whose columns changed, can break code that maps results to types.

What triggers it, and the safer way

unsafe.sql
-- watched query: SELECT total FROM orders
ALTER TABLE orders ALTER COLUMN total TYPE numeric(12,2);
safer.sql
-- Update the application's types for orders.total before or with this migration.

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
-- fronelta:allow FRN815 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.