Skip to content

Commit

Permalink
Don't strip DISTINCT from unread_replies query for PostgreSQL
Browse files Browse the repository at this point in the history
Why the fuck was this even done in the first place?
  • Loading branch information
stevenjm committed Jun 29, 2014
1 parent 442a56b commit 0d24bd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Subs-Db-postgresql.php
Expand Up @@ -293,7 +293,7 @@ function smf_db_query($identifier, $db_string, $db_values = array(), $connection
'~(.)$~' => '$1 ORDER BY LENGTH(user_agent) DESC',
),
'unread_replies' => array(
'~SELECT\\s+DISTINCT\\s+t.id_topic~' => 'SELECT t.id_topic, {raw:sort}',
'~SELECT\\s+DISTINCT\\s+t.id_topic~' => 'SELECT DISTINCT t.id_topic, {raw:sort}',
),
'profile_board_stats' => array(
'~COUNT\(\*\) \/ MAX\(b.num_posts\)~' => 'CAST(COUNT(*) AS DECIMAL) / CAST(b.num_posts AS DECIMAL)',
Expand Down

0 comments on commit 0d24bd7

Please sign in to comment.