PostgreSQL: Count all records in spite of using offset/limit

PHOTO EMBED

Mon Aug 29 2022 16:04:58 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #sql

SELECT *, count(*) OVER() AS full_count
FROM   tbl
WHERE  /* whatever */
ORDER  BY col1
LIMIT  ?
OFFSET ?
content_copyCOPY

This sentence shows the way to count all resulting records in spite of using offset/limit.