There seems to be explicit code within the statistics module that does not work under postgres databases (Postgresql 8.3.3).
I can confirm that this works under MySQL without a problem.

Under Postgres at the page index.php?q=admin/reports/visitors, i get the following message:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: function concat(int_unsigned, character varying) does not exist LINE 1: SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM accesslog ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. in /home/websites/drupal_worker/includes/database.pgsql.inc on line 138.
    * user warning: query: SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM accesslog in /home/websites/drupal_worker/modules/statistics/statistics.admin.inc on line 87.

The command like postgres connection states that the following command fails on the CONCAT portion:

drupal_worker=# SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM accesslog;
ERROR:  function concat(int_unsigned, character varying) does not exist
LINE 1: SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM accesslog...
                              ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Comments

damien tournoud’s picture

Version: 6.4 » 7.x-dev

Well that's another PostgreSQL 8.3-specific issue :(

The hint gives a good clue about the origin of the problem: You might need to add explicit type casts..

Bumping to 7.x-dev, because that's the highest version with that particular issue.

lukeprentice’s picture

see comment on http://drupal.org/node/150015 for a fix in postgres 8.3.x

dave reid’s picture

Status: Active » Closed (duplicate)