the postgres db function db_distinct_field has this strange behavior where it makes the first sort criteria $table.$field which is passed to it.
see line
$query = preg_replace('/(ORDER BY )(?!'. $table .'\.'. $field .')/', '\1'."$table.$field, ", $query);

I might see the value in making it the last sort criteria but as is orders end up getting overridden (this can happen with the views module). Personally I just removed the line completely from my installs.

This is probably bad timing for such a low level change.

Cheers,
Steven

Comments

dpearcefl’s picture

Status: Active » Closed (won't fix)

Considering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.