Stop the bug list 500ing on every unfiltered load

Fixkamo-shared-library
Shipped
August 25, 2026 at 3:29 PM UTC
Author
Kamo
Commit
718635f

PostgreSQL cannot infer a type for a null parameter inside a string expression: LOWER(CONCAT('%', :search, '%')) with a null :search guessed bytea, and the list died on 'function lower(bytea) does not exist' for every load without a search term — which is all of them by default. :search is now a ready-made, lower-cased LIKE pattern built by the caller and never null, with ESCAPE declared so the caller's escaping of % and _ is not inert. Two more faults found while fixing it: the nullable description needed COALESCE, because NULL LIKE '%' is NULL rather than true and a bug filed with no description would have vanished from an unfiltered list; and the derived count query counted a bug once per site it named, so a bug tagged with three sites inflated the total by two. Verified by executing the generated SQL against yb-tserver directly.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing