1 -- Should be run on Postgres 8.3 or newer to remove the 'default'
3 CREATE OR REPLACE FUNCTION ts2_page_title()
8 IF TG_OP
= 'INSERT' THEN
9 NEW.titlevector
= to_tsvector(REPLACE(NEW.page_title
,'/',' '));
10 ELSIF
NEW.page_title
!= OLD.page_title
THEN
11 NEW.titlevector
:= to_tsvector(REPLACE(NEW.page_title
,'/',' '));
17 CREATE OR REPLACE FUNCTION ts2_page_text()
22 IF TG_OP
= 'INSERT' THEN
23 NEW.textvector
= to_tsvector(NEW.old_text
);
24 ELSIF
NEW.old_text
!= OLD.old_text
THEN
25 NEW.textvector
:= to_tsvector(NEW.old_text
);