View Issue Details

IDProjectCategoryView StatusLast Update
0011786Talerotherpublic2026-09-19 15:23
ReporterFlorian Dold Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Target VersionSomeday 
Summary0011786: consider returning total number of results in paginated responses
DescriptionIt's a pretty common pattern to show the total number of results in paginated responsed.

I think that where we *can* cheaply return this information, we should!

This first needs a spec, i.e. we need to agree on some common name(s) for field(s) in various APIs.
TagsNo tags attached.

Activities

Christian Grothoff

2026-09-18 23:12

manager   ~0030006

In PostgreSQL, the complexity of:

SELECT count(*) FROM table_name;

is generally O(n), where n is the number of rows in the table. pg_class.reltuples is an O(1) approach to get an *approximation*, but probably not good enough. So adding this would require a new table (!) where we would have to track the counter and UPDATE on every INSERT/DELETE. Doable, but painful and I'm not convinced worth the overhead...

Issue History

Date Modified Username Field Change
2026-09-10 15:33 Florian Dold New Issue
2026-09-10 15:33 Florian Dold Status new => assigned
2026-09-10 15:33 Florian Dold Assigned To => Christian Grothoff
2026-09-18 23:12 Christian Grothoff Note Added: 0030006
2026-09-18 23:13 Christian Grothoff Severity minor => feature
2026-09-18 23:13 Christian Grothoff Status assigned => acknowledged
2026-09-18 23:13 Christian Grothoff Target Version 1.8 => Someday
2026-09-19 15:23 Christian Grothoff Assigned To Christian Grothoff =>