Changeset 104 for trunk


Ignore:
Timestamp:
07/19/11 13:45:41 (9 years ago)
Author:
astrid.emde
Message:

neue Funktion deleteFeature(typename text, featureid text), wird nach Import des Layers delete aufgerufen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/konvert/postnas_0.6/alkis_PostNAS_0.6_schema.sql

    r97 r104  
    5757--                            http://trac.osgeo.org/gdal/changeset/22336 
    5858--  2011-05-30  AE: constraints enforce_geotype_wkb_geometry fÃŒr ax_klassifizierungnachwasserrecht, ax_klassifizierungnachstrassenrecht um MULTIPOLYGON erweitert 
     59-- 2011-07-19 neue Funktion deleteFeature(typename text, featureid text), wird nach Import des Layers delete aufgerufen 
    5960 
    6061--  VERSIONS-NUMMER: 
     
    42854286COMMENT ON TABLE spatial_ref_sys  IS 'Koordinatensysteme und ihre Projektionssparameter'; 
    42864287 
     4288 
     4289-- 
     4290-- Funktion to run after import of the delete-Layer 
     4291-- 
     4292CREATE FUNCTION deleteFeature(typename text, featureid text) RETURNS text  
     4293AS $$  
     4294 DECLARE  
     4295  query text; 
     4296  res text;  
     4297 BEGIN  
     4298     query := 'DELETE FROM ' || $1 || ' WHERE gml_id = ''' || $2 || ''''; 
     4299     EXECUTE query; 
     4300     query := 'DELETE FROM alkis_beziehungen WHERE beziehung_von = ''' || $2 || ''' OR beziehung_zu = ''' || $2 || ''''; 
     4301     EXECUTE query; 
     4302 
     4303     IF FOUND THEN  
     4304        RAISE NOTICE 'query successfull % ', query;  
     4305        res := 1; 
     4306     ELSE  
     4307        RAISE NOTICE 'query no object found % ', query;  
     4308        res := 0; 
     4309     END IF;  
     4310  RETURN res;  
     4311 END;  
     4312$$ LANGUAGE plpgsql;  
     4313 
    42874314-- 
    42884315--          THE  (happy)  END 
Note: See TracChangeset for help on using the changeset viewer.