Well I\'ve just hit a weird behaviour that I\'ve never seen before, or haven\'t noticed.
I\'m using this query:
SELECT *, COUNT(*) AS pag
Using an aggregate function without a GROUP BY will always return one row, no matter what. You must use a GROUP BY if you want to return more than one row.
Note that on most RDBMS, such a query would have failed because it makes no sense.