Project

General

Profile

« Previous | Next » 

Revision 3751

Added by Jing Tao over 16 years ago

Add new code for xml_nodes table.

View differences:

src/tsvector.sql
1 1
BEGIN;
2 2
ALTER TABLE xml_path_index  ADD COLUMN nodedatavector TSVECTOR;
3 3
UPDATE xml_path_index SET  nodedatavector = to_tsvector(nodedata);
4
tsvector_update_trigger(nodedatavector, 'pg_catalog.english', 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 5
CREATE INDEX xml_path_index_vector ON xml_path_index USING gin(nodedatavector);
6 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

  

Also available in: Unified diff