source: trunk/data/konvert/postnas_0.6/atkis_rp_rendering/processing/sql/stehendesgewaesser_prep.sql @ 118

Revision 118, 786 bytes checked in by tobias.dick, 10 years ago (diff)

Bugfixes

Line 
1DROP TABLE IF EXISTS map_stehendesgewaesser_g0;
2DROP SEQUENCE IF EXISTS map_stehendesgewaesser_g0_gid_seq;
3--
4
5SELECT
6wkb_geometry,
7widmung
8INTO map_stehendesgewaesser_g0
9
10FROM (
11        SELECT (ST_Dump( ST_Union( ax_stehendesgewaesser.wkb_geometry ))).geom AS wkb_geometry, unverschluesselt as widmung
12        FROM ax_stehendesgewaesser GROUP BY widmung
13) AS wrapper;
14--
15CREATE INDEX map_stehendesgewaesser_g0_gidx ON map_stehendesgewaesser_g0 USING GIST ( wkb_geometry );
16CREATE SEQUENCE map_stehendesgewaesser_g0_gid_seq;
17ALTER TABLE map_stehendesgewaesser_g0 ADD COLUMN gid INTEGER;
18UPDATE map_stehendesgewaesser_g0 SET gid = nextval('map_stehendesgewaesser_g0_gid_seq');
19ALTER TABLE map_stehendesgewaesser_g0 ALTER COLUMN gid SET DEFAULT nextval('map_stehendesgewaesser_g0_gid_seq');
20----
Note: See TracBrowser for help on using the repository browser.