Caught a slow query today where WHERE COALESCE(archived_at, '2099-01-01') > NOW() was forcing a sequential scan because wrapping the column in a function bypassed the B-tree index. Rewriting it as WHERE archived_at IS NULL OR archived_at > NOW() let the planner use the index right away.
commit 9294136