Project

General

Profile

1
CREATE TABLE temp AS SELECT * FROM xml_queryresult;
2
DROP TABLE xml_queryresult;
3
CREATE TABLE xml_queryresult(
4
  queryresult_id INT8 default nextval('xml_queryresult_id_seq'), -- id for this entry
5
  returnfield_id       INT8,          -- id for the returnfield corresponding to this entry
6
  docid                VARCHAR(250),  -- docid of the document
7
  queryresult_string   VARCHAR(13000), -- resultant text generated for this docid and given
8
                                       -- returnfield
9
  CONSTRAINT xml_queryresult_pk PRIMARY KEY (queryresult_id),
10
  CONSTRAINT xml_queryresult_searchid_fk
11
               FOREIGN KEY (returnfield_id) REFERENCES xml_returnfield
12
);
13
CREATE INDEX xml_queryresult_idx1 ON xml_queryresult (returnfield_id, docid);
14
/* Insert data */
15
INSERT INTO xml_queryresult (returnfield_id, docid, queryresult_string)
16
        SELECT returnfield_id, docid, queryresult_string from temp;
17
/* Drop temp table */
18
DROP TABLE temp;
19

    
20

    
21

    
(7-7/34)