From 086ae52d12011746a75f5588e877347bc0457352 Mon Sep 17 00:00:00 2001
From: Pierre Schmitz <pierre@archlinux.de>
Date: Fri, 21 Mar 2008 11:49:34 +0100
Subject: Update auf MediaWiki 1.12.0

---
 maintenance/postgres/archives/patch-ts2pagetitle.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 maintenance/postgres/archives/patch-ts2pagetitle.sql

(limited to 'maintenance/postgres/archives/patch-ts2pagetitle.sql')

diff --git a/maintenance/postgres/archives/patch-ts2pagetitle.sql b/maintenance/postgres/archives/patch-ts2pagetitle.sql
new file mode 100644
index 00000000..4ac985e3
--- /dev/null
+++ b/maintenance/postgres/archives/patch-ts2pagetitle.sql
@@ -0,0 +1,13 @@
+CREATE OR REPLACE FUNCTION ts2_page_title()
+RETURNS TRIGGER
+LANGUAGE plpgsql AS
+$mw$
+BEGIN
+IF TG_OP = 'INSERT' THEN
+  NEW.titlevector = to_tsvector('default',REPLACE(NEW.page_title,'/',' '));
+ELSIF NEW.page_title != OLD.page_title THEN
+  NEW.titlevector := to_tsvector('default',REPLACE(NEW.page_title,'/',' '));
+END IF;
+RETURN NEW;
+END;
+$mw$;
-- 
cgit v1.2.3-54-g00ecf

