Project

General

Profile

« Previous | Next » 

Revision 2504

Added by sgarg almost 19 years ago

Making changes in postgres db upgrade script such that instead of JDBC, SQL is used for updating the DB

View differences:

upgrade-db-to-1.5-postgres.sql
116 116
);
117 117

  
118 118
CREATE SEQUENCE xml_queryresult_id_seq;
119
     
120 119

  
120
ALTER TABLE xml_nodes ADD nodedatanumerical FLOAT8;
121

  
122
UPDATE xml_nodes SET nodedatanumerical = to_number(nodedata, '999999999999999999999999999D9999999999999999999999999999')
123
WHERE nodedata IS NOT NULL AND UPPER(nodedata) = LOWER(nodedata)
124
AND (TRIM(REPLACE(nodedata,'\n','')) SIMILAR TO '(^(-|[+]|[0-9])[0-9]*[.][0-9]*)'
125
OR TRIM(REPLACE(nodedata,'\n','')) SIMILAR TO '^(.)[0-9]+'
126
OR TRIM(REPLACE(nodedata,'\n','')) SIMILAR TO '^(-|[+]|[0-9])[0-9]*')
127
AND TRIM(REPLACE(nodedata,'\n','')) not SIMILAR TO '(-|[+])';
128

  

Also available in: Unified diff