I followed this post, and more precisely this answer, to be able to obtain the row count from my PostgreSQL query before LIMIT and OFFSET are applied.
Therefore using this kind of code:
SELECT foo
,count(*) OVER() AS filtered_count
FROM bar
WHERE <some condition>
ORDER BY <some col>
LIMIT <pagesize>
OFFSET <offset>
I obtain the count of every row fitting the WHERE clause.
That's pretty cool, and I wonder if there is a similar way to also have the full count of rows, before the WHERE is made?
Thanks in advance for your help!