Project

General

Profile

1
BEGIN;
2
ALTER TABLE xml_path_index  ADD COLUMN nodedatavector TSVECTOR;
3
UPDATE xml_path_index SET  nodedatavector = to_tsvector(nodedata);
4
CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON xml_path_index FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger(nodedatavector, 'pg_catalog.english', nodedata);
5
CREATE INDEX xml_path_index_vector ON xml_path_index USING gin(nodedatavector);
6
COMMIT;
7
BEGIN;
8
ALTER TABLE xml_nodes  ADD COLUMN nodedatavector TSVECTOR;
9
UPDATE xml_nodes SET  nodedatavector = to_tsvector(nodedata);
10
CREATE TRIGGER xml_node_tsvectorupdate BEFORE INSERT OR UPDATE ON xml_nodes FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger(nodedatavector, 'pg_catalog.english', nodedata);
11
CREATE INDEX xml_node_vector ON xml_nodes USING gin(nodedatavector);
12
COMMIT;
13

    
(27-27/83)