- doc :=
- setweight(to_tsvector('english', coalesce(new.tagnames,'')), 'A') ||
- setweight(to_tsvector('english', coalesce(new.title,'')), 'B') ||
- setweight(to_tsvector('english', coalesce(new.body,'')), 'C');
+ SELECT
+ setweight(to_tsvector('english', coalesce(tagnames,'')), 'A') ||
+ setweight(to_tsvector('english', coalesce(title,'')), 'B') ||
+ setweight(to_tsvector('english', coalesce(body,'')), 'C') INTO doc
+ FROM forum_node WHERE id = root_id;