Merge "Use {{int:}} on MediaWiki:Blockedtext and MediaWiki:Autoblockedtext"
[lhc/web/wiklou.git] / maintenance / postgres / archives / patch-ts2pagetitle.sql
1 CREATE OR REPLACE FUNCTION ts2_page_title()
2 RETURNS TRIGGER
3 LANGUAGE plpgsql AS
4 $mw$
5 BEGIN
6 IF TG_OP = 'INSERT' THEN
7 NEW.titlevector = to_tsvector(REPLACE(NEW.page_title,'/',' '));
8 ELSIF NEW.page_title != OLD.page_title THEN
9 NEW.titlevector := to_tsvector(REPLACE(NEW.page_title,'/',' '));
10 END IF;
11 RETURN NEW;
12 END;
13 $mw$;