r25593 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25592‎ | r25593 | r25594 >
Date:16:42, 6 September 2007
Author:greg
Status:old
Tags:
Comment:
Add the Postgres slash search fix to existing installations.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/maintenance/postgres/archives/patch-ts2pagetitle.sql (added) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/postgres/archives/patch-ts2pagetitle.sql
@@ -0,0 +1,13 @@
 2+CREATE OR REPLACE FUNCTION ts2_page_title()
 3+RETURNS TRIGGER
 4+LANGUAGE plpgsql AS
 5+$mw$
 6+BEGIN
 7+IF TG_OP = 'INSERT' THEN
 8+ NEW.titlevector = to_tsvector('default',REPLACE(NEW.page_title,'/',' '));
 9+ELSIF NEW.page_title != OLD.page_title THEN
 10+ NEW.titlevector := to_tsvector('default',REPLACE(NEW.page_title,'/',' '));
 11+END IF;
 12+RETURN NEW;
 13+END;
 14+$mw$;
Property changes on: trunk/phase3/maintenance/postgres/archives/patch-ts2pagetitle.sql
___________________________________________________________________
Added: svn:eol-style
115 + native
Index: trunk/phase3/maintenance/updaters.inc
@@ -1526,5 +1526,9 @@
15271527 dbsource($ni[2]);
15281528 }
15291529
 1530+ # Tweak the page_title tsearch2 trigger to filter out slashes
 1531+ # This is create or replace, so harmless to call if not needed
 1532+ dbsource(archive("patch-ts2pagetitle.sql"));
 1533+
15301534 return;
15311535 }
Index: trunk/phase3/RELEASE-NOTES
@@ -23,6 +23,7 @@
2424 === New features in 1.12 ===
2525
2626 === Bug fixes in 1.12 ===
 27+* Subpages are now indexed for searching properly when using Postgres
2728
2829 === API changes in 1.12 ===
2930

Follow-up revisions

RevisionCommit summaryAuthorDate
r25607Merged revisions 25530-25606 via svnmerge from...david06:11, 7 September 2007

Status & tagging log