Index: openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql 5 Nov 2010 16:35:10 -0000 1.9
+++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql 2 Apr 2013 11:05:18 -0000 1.10
@@ -23,6 +23,13 @@
+
+ postgresql8.4
+
+ where fti @@ to_tsquery(:query)
+
+
+
postgresql8.3
@@ -37,6 +44,22 @@
+
+ postgresql8.4
+
+ select distinct(orig_object_id) from acs_permission__permission_p_recursive_array(array(
+ select txt.object_id
+ from
+ [join $from_clauses ","]
+ $base_query
+ [expr {[llength $where_clauses] > 0 ? " and " : ""}]
+ [join $where_clauses " and "]
+ order by ts_rank(fti,to_tsquery(:query)) desc
+ ), :user_id, 'read')
+ $limit_clause $offset_clause
+
+
+
postgresql8.3
@@ -49,6 +72,20 @@
+
+ postgresql8.4
+
+ select count(distinct(orig_object_id)) from acs_permission__permission_p_recursive_array(array(
+ select txt.object_id
+ from
+ [join $from_clauses ","]
+ $base_query
+ [expr {[llength $where_clauses] > 0 ? " and " : ""}]
+ [join $where_clauses " and "]
+ ), :user_id, 'read')
+
+
+
postgresql8.3