ZF-3740: Counting results does not work in postgresql with order by in query


This does not work in postgresql

SELECT COUNT(*) AS zend_paginator_row_count FROM users  order by name asc

it throws error ERROR: column "" must appear in the GROUP BY clause or be used in an aggregate function

You shoud shoul also reset order by

$rowCount   = clone $this->_select;


Resolved in revision 10351