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.11 -r1.12
--- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql 27 Apr 2015 15:28:20 -0000 1.11
+++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql 7 Aug 2017 23:48:29 -0000 1.12
@@ -11,18 +11,6 @@
-
- postgresql8.3
-
- where fti @@ to_tsquery(:query)
- and exists (select 1
- from acs_object_party_privilege_map m
- where m.object_id = txt.object_id
- and m.party_id = :user_id
- and m.privilege = 'read')
-
-
-
postgresql8.4
@@ -34,8 +22,7 @@
postgresql8.3
select txt.object_id
- from
- [join $from_clauses ","]
+ from [join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and " : ""}]
[join $where_clauses " and "]
@@ -47,13 +34,12 @@
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
+ 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
@@ -63,8 +49,7 @@
postgresql8.3
select count(*)
- from
- [join $from_clauses ","]
+ from [join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and [join $where_clauses { and }]" : ""}]
@@ -75,8 +60,7 @@
select count(distinct(orig_object_id)) from acs_permission__permission_p_recursive_array(array(
select txt.object_id
- from
- [join $from_clauses ","]
+ from [join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and " : ""}]
[join $where_clauses " and "]
@@ -113,18 +97,6 @@
-
- postgresql8.0
-
- where fti @@ to_tsquery('default',:query)
- and exists (select 1
- from acs_object_party_privilege_map m
- where m.object_id = txt.object_id
- and m.party_id = :user_id
- and m.privilege = 'read')
-
-
-
postgresql8.0