Opened 14 years ago
Last modified 14 years ago
#783 new defect
WMS upload
Reported by: | arnulf | Owned by: | dev |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | database | Version: | 2.7 |
Keywords: | Cc: |
Description
Upload WMS: http://esdin.fgi.fi/esdin/SKv2/skwms1/wms.hy_physical?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
Error: file: http://esdin.fgi.fi/SKv2/SKv2?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilitiessql error: ERROR: value too long for type character varying(50) ROLLBACK performed....
PostgreSQL says: 2011-02-18 16:25:24 CET STATEMENT: INSERT INTO layer_style (fkey_layer_id, name, title, legendurl, legendurlformat) VALUES($1,$2,$3,$4,$5)
Change History (5)
comment:1 by , 14 years ago
Component: | administration → database |
---|
comment:2 by , 14 years ago
Workaround (hack!). Increase the size of the corresponding fields:
update pg_attribute set atttypmod = 512+4 where attrelid = 'layer_style'::regclass and attname = 'legendurl'; update pg_attribute set atttypmod = 255+4 where attrelid = 'layer_style'::regclass and attname = 'name';
(4 needs to be added to the actual field size for Postgres legacy reasons, don't ask...)
comment:3 by , 14 years ago
Next problem:
INSERT INTO gui_layer (fkey_gui_id, fkey_layer_id, gui_layer_wms_id, gui_layer_status, gui_layer_selectable, gui_layer_visible, gui_layer_queryable, gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale, gui_layer_priority, gui_layer_style, gui_layer_title) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13)
(this WMS is a pita)
General note: We should stop to use varchar(anything) as primary IDs. Who is interested to join in cleaning up the database model?
comment:4 by , 14 years ago
Hack (cont')
update pg_attribute set atttypmod = 255+4 where attrelid = 'gui_layer'::regclass and attname = 'gui_layer_style';
Now Finnish service can be uploaded. This should be fixed in the database asap. (if somebody gives me a hint what needs to be done I would do it myself).
Changed Component to database