Revision 7053
Added by ben leinfelder over 12 years ago
src/upgrade-db-to-2.0.0-oracle.sql | ||
---|---|---|
151 | 151 |
*/ |
152 | 152 |
ALTER TABLE xml_access DROP COLUMN docid; |
153 | 153 |
|
154 |
/** |
|
155 |
* expand xml_path_index 'path' column to hold larger strings |
|
156 |
*/ |
|
157 |
ALTER TABLE xml_path_index MODIFY ( path VARCHAR2(4000) ); |
|
154 | 158 |
|
155 | 159 |
/* |
156 | 160 |
* update the database version |
src/xmltables-oracle.sql | ||
---|---|---|
333 | 333 |
CREATE TABLE xml_path_index ( |
334 | 334 |
nodeid NUMBER(20), -- the unique node id |
335 | 335 |
docid VARCHAR2(250), -- index to the document id |
336 |
path VARCHAR2(1000), -- precomputed path through tree
|
|
336 |
path VARCHAR2(4000), -- precomputed path through tree
|
|
337 | 337 |
nodedata VARCHAR2(4000), -- the data for this node e.g., |
338 | 338 |
nodedatanumerical NUMBER(20), -- the data for this node if |
339 | 339 |
nodedatadate TIMESTAMP, -- the data for this node if it is a date |
src/upgrade-db-to-2.0.0-postgres.sql | ||
---|---|---|
163 | 163 |
*/ |
164 | 164 |
ALTER TABLE xml_access DROP COLUMN docid; |
165 | 165 |
|
166 |
|
|
167 |
/** |
|
168 |
* expand xml_path_index 'path' column to hold larger strings |
|
169 |
*/ |
|
170 |
ALTER TABLE xml_path_index ALTER COLUMN path TYPE text; |
|
171 |
|
|
166 | 172 |
/* |
167 | 173 |
* update the database version |
168 | 174 |
*/ |
src/xmltables-postgres.sql | ||
---|---|---|
405 | 405 |
CREATE TABLE xml_path_index ( |
406 | 406 |
nodeid INT8 default nextval('xml_path_index_id_seq'), |
407 | 407 |
docid VARCHAR(250), -- the document id |
408 |
path VARCHAR(1000), -- precomputed path through tree
|
|
408 |
path TEXT, -- precomputed path through tree
|
|
409 | 409 |
nodedata TEXT, -- the data for this node (e.g., |
410 | 410 |
-- for TEXT it is the content) |
411 | 411 |
nodedatanumerical FLOAT8, -- the data for this node if it is a number |
Also available in: Unified diff
increase amount of text the 'xml_path_index.path' column can accommodate. I was seeing errors like this during indexing:
knb 20120312-11:42:05: [ERROR]: DocumentImpl.buildIndex - SQL Exception while indexing document knb-lter-and.3147 : ERROR: value too long for type character varying(1000) [edu.ucsb.nceas.metacat.DocumentImpl]