Sql error using postgresql 8

fmenegoni - June 1, 2008 - 10:07
Project:Blog Add-ons
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I like very much that module, btw there are a couple of issues with drupal6/postgresql8:
- blog front page error:

Query failed: ERROR: column "u.name" must appear in the GROUP BY clause or be used in an aggregate function
query: SELECT u.name, COUNT(n.uid) AS nposts FROM users u INNER JOIN node n ON u.uid = n.uid WHERE n.status=1 AND n.type = 'blog' GROUP BY u.uid ORDER BY nposts DESC LIMIT 20 OFFSET 0 in /var/www/www.oth.org/drupal-6.2/sites/all/modules/blog_addons/blog_addons.module on line 143.

(solved grouping by u.name)

- front page of a user's blog:

Query failed: ERROR: function from_unixtime(integer) does not exist
query: SELECT n.nid, n.created, YEAR(FROM_UNIXTIME(n.created)) AS year, MONTH(FROM_UNIXTIME(n.created)) AS month, DAY(FROM_UNIXTIME(n.created)) AS day FROM node n WHERE n.type = 'blog' AND n.status = 1 AND n.uid = 1 ORDER BY n.created DESC LIMIT 20 OFFSET 0 in /var/www/www.oth.org/drupal-6.2/sites/all/modules/blog_addons/blog_addons.module on line 422.

I think from_unixtime() is available only on mysql.

Thank you for that module.

#1

Chajecki - June 20, 2008 - 16:54

Thanks for reporting it. Unfortunately I don't have an access to postgresql (either experience in using it) so I cannot provide a patch at this moment but I will do my best to do it as soon as possible.
If anyone can help (send me a patch) I will be happy to implement it in new release.

Cheers.

#2

kbogert - August 4, 2008 - 19:55

Try this patch: http://drupal.org/node/291075

Unfortunately, I only have it for Drupal 5.

#3

spydmobile - January 14, 2009 - 18:37

I have this issue as well, would love to use this module but am based on pgsql and confirm the above mentioned errors.

 
 

Drupal is a registered trademark of Dries Buytaert.