PostgreSQL compatibility

mustafau - March 2, 2008 - 13:11
Project:Chart API
Version:5.x-1.0-1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:won't fix
Description

I am using PostgreSQL. Following errors appear on system charts pages.

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: function from_unixtime(integer, "unknown") does not exist LINE 4: WHERE FROM_UNIXTIME(created, '%Y %e') = FROM_UNIX... ^ HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT COUNT(*) as count, type FROM node WHERE FROM_UNIXTIME(created, '%Y %e') = FROM_UNIXTIME(UNIX_TIMESTAMP(), '%Y %e') GROUP BY type ORDER BY type in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 144.
    * warning: pg_query() [function.pg-query]: Query failed: ERROR: function from_unixtime(integer, "unknown") does not exist LINE 4: FROM_UNIXTIME(created, '%D') as day_created, ^ HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT type, COUNT(*) as count, FROM_UNIXTIME(created, '%D') as day_created, FROM_UNIXTIME(created, '%Y %M') as time_created FROM node WHERE FROM_UNIXTIME(created, '%Y %M') = FROM_UNIXTIME(UNIX_TIMESTAMP(), '%Y %M') GROUP BY type, day_created ORDER BY created in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 144.

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "r.name" must appear in the GROUP BY clause or be used in an aggregate function in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT COUNT(*) as count, r.* FROM users_roles ur LEFT JOIN users u ON ur.uid = u.uid LEFT JOIN role r ON r.rid = ur.rid GROUP BY r.rid ORDER BY r.name in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 144.

#1

tjholowaychuk - March 2, 2008 - 16:19

Interesting! I may have to come up with another way to generate that query, I will look into it.

#2

tjholowaychuk - March 2, 2008 - 18:51
Status:active» fixed

Should be fixed in 1.0.1 let me know if anything pops up.

#3

mustafau - March 3, 2008 - 11:15
Version:5.x-1.0-0» 5.x-1.0-1
Status:fixed» active

Following error remains at the "Users" tab.

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "r.name" must appear in the GROUP BY clause or be used in an aggregate function in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT COUNT(*) as count, r.* FROM users_roles ur LEFT JOIN users u ON ur.uid = u.uid LEFT JOIN role r ON r.rid = ur.rid GROUP BY r.rid ORDER BY r.name in /home/mustafau/pdt_workspace/drupal/includes/database.pgsql.inc on line 144.

#4

tjholowaychuk - March 3, 2008 - 17:08

Sorry I am not overly experienced with PostrgreSQL, I will look into this some more, if you are able to issue a patch that would be great. Hopefully I will get that up and running soon thanks.

#5

tjholowaychuk - April 30, 2008 - 16:43
Status:active» postponed

#6

tjholowaychuk - June 3, 2008 - 23:37
Status:postponed» won't fix
 
 

Drupal is a registered trademark of Dries Buytaert.