Description

Zend_Paginator_Adapter_DbSelect make incorrect SQL query when use join keyword.
It make few columns as argument that passed to DISTINCT function than DISTINCT function make multi column result that COUNT function didn't understand.

The error is:
{quote}
"Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42883]: Undefined function: 7 ERROR: function count(bigint, character varying, character varying) does not exist at character 8 HINT: No function matches the given name and argument types. You might need to add explicit type casts." when use Zend_Paginator with joinLeft functions.
{quote}
Postgresql log:
ERROR: function count(bigint, character varying, character varying) does not exist at character 8
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT: