SELECT COUNT(*) FROM pg_attribute ... returns a 60-row, 0-column result instead of a single count.
PgAttributeHandler synthesizes rows for the projection it recognizes and has no case for an aggregate, so a count query falls through to the row-producing path and emits one empty row per attribute.
Pre-existing. It became reachable during #87 when the pg_class/pg_namespace interception branches were removed — before that, some count queries were absorbed elsewhere.
src/catalog/pg_roles.rs carries its own count_response helper and is the precedent for the shape a fix would take. An equivalent helper was deleted from src/catalog/pg_namespace handling along with that handler; it is in the #87 branch history if useful.
The broader fix is #95 — migrating pg_attribute to a SQLite view makes COUNT(*) work for free, since SQLite executes the aggregate.
SELECT COUNT(*) FROM pg_attribute ...returns a 60-row, 0-column result instead of a single count.PgAttributeHandlersynthesizes rows for the projection it recognizes and has no case for an aggregate, so a count query falls through to the row-producing path and emits one empty row per attribute.Pre-existing. It became reachable during #87 when the
pg_class/pg_namespaceinterception branches were removed — before that, some count queries were absorbed elsewhere.src/catalog/pg_roles.rscarries its owncount_responsehelper and is the precedent for the shape a fix would take. An equivalent helper was deleted fromsrc/catalog/pg_namespacehandling along with that handler; it is in the #87 branch history if useful.The broader fix is #95 — migrating
pg_attributeto a SQLite view makesCOUNT(*)work for free, since SQLite executes the aggregate.