Installation:
Drupal 5.1
UserPoints 5.x-1.1
PostgresSQL Database Server 8.23

Scenario:
- Install UserPoints module
- update the database
- make HighestUser visible on the right sidebar

==> No users are displayed as following SQL seems to be executed:

SELECT p.uid, u.name, p.points FROM userpoints p INNER JOIN users u USING (uid) GROUP BY p.uid ORDER BY p.points DESC LIMIT 5 OFFSET 0 in /usr/local/drupal-5.1/includes/database.pgsql.inc on line 144.

This SQL is malformed as it doesn't state any aggregation functions for u.name and p.points.

Please advise.

Comments

kbahey’s picture

Priority: Critical » Normal

You have a point there about no aggregation function.

It works OK in MySQL though.

I don't use PostgreSQL, so someone who does must come up with a tested patch, then I will commit it.

kbahey’s picture

Status: Active » Needs work
jaime_pomales’s picture

Version: 5.x-1.1 » master
Component: Code » Code: userpoints_transaction_tools
StatusFileSize
new568 bytes

Will this do? This patch adds u.name and p.points to the aggregate. Just because it works in Mysql doesn't mean it's correct. I'm happy to help fixing all the issues that I have with this module on postgresql. I've got a bunch of custom patches to get it working mostly (I'm still having problems however).

Anyway, this is a super simple fix.

jredding’s picture

Status: Needs work » Needs review

patch manually tested and applied to cvs tag DRUPAL-5--3 (NOT HEAD).

jredding’s picture

Status: Needs review » Postponed (maintainer needs more info)

This needs some Postgres-user's loving. Can anyone test out 2.14 and v3 on postgres to ensure they are working correctly.

transaction_tools is merged into core (not a contrib module) in v3

jaime_pomales’s picture

Sure, I'll take a look and get back to you.

jredding’s picture

Project: User Points » User Points Contributed modules
Version: master » 5.x-2.x-dev
berdir’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.