diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/cake/libs/model/datasources/dbo/dbo_postgres.php index 313036ac5..1fcc40500 100644 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/cake/libs/model/datasources/dbo/dbo_postgres.php @@ -339,7 +339,7 @@ class DboPostgres extends DboSource { } $count = count($fields); - if ($count >= 1 && !preg_match('/^\s*COUNT\(/', $fields[0])) { + if ($count >= 1 && !preg_match('/^\s*COUNT\(\*/', $fields[0])) { $result = array(); for ($i = 0; $i < $count; $i++) { if (!preg_match('/^.+\\(.*\\)/', $fields[$i]) && !preg_match('/\s+AS\s+/', $fields[$i])) {