From 1c6e1d42bd5ebc3fd6f3d30c78c571d35ecb8a03 Mon Sep 17 00:00:00 2001
From: Ben Coleman <b.coleman@accelerateddesign.com>
Date: Tue, 8 Nov 2011 14:59:51 -0500
Subject: [PATCH] Fix PostgreSQL GROUP BY incompatibility

---
 linkintel.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linkintel.module b/linkintel.module
index 69a075e..4f63c8f 100644
--- a/linkintel.module
+++ b/linkintel.module
@@ -1008,7 +1008,7 @@ function linkintel_load_filtered_requests_result($filter = array(), $options = a
     $count_sql .=  " WHERE " . $filter['where'];
   }
   if ($options['distinct_keyword']) {
-    $sql .=  " GROUP BY k.keyword";
+    $sql .=  " GROUP BY k.keyword, r.rid, r.nid, r.path, r.options, r.external, r.uid, r.mode, r.kid, r.text, r.allow_variants, r.priority, r.sync, r.attributes, k.keyword_stem, p.priority, kwr.kid, kwr.priority, p.type_priority, n.type, k.word_count";
     $count_sql .=  " GROUP BY k.keyword";
   }
   $sql .= $tablesort;
-- 
1.7.6.msysgit.0

