- Ya
- 25 Agosti 2026, 15:29 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 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.