Changes between Version 1 and Version 2 of UsersWikiCheckInvalidGeometriesFromGeometryColumns


Ignore:
Timestamp:
May 8, 2011, 9:19:59 AM (13 years ago)
Author:
aperi2007
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiCheckInvalidGeometriesFromGeometryColumns

    v1 v2  
    1616        sql := 'DROP TABLE IF EXISTS ' || quote_ident(tabris) ||';';
    1717    execute(sql);
    18     sql := 'CREATE TABLE ' || quote_ident(tabris) || ' (id serial, query TEXT, conteggio INTEGER);';
     18    sql := 'CREATE TABLE ' || quote_ident(tabris) || ' (id serial, query TEXT, invalidity INTEGER);';
    1919        sql := 'select ''select count(*) from '' || quote_ident(f_table_schema) || ''.'' || quote_ident(f_table_name) || '' where ST_IsValid('' || f_geometry_column || '')=false;'' as query from public.geometry_columns';
    2020
     
    2323            raise notice 'executing: %', _rec1.query;
    2424            execute(_rec1.query) into ris;
     25            sql := 'insert into ' || quote_ident(tabris) || ' (query, invalidity) values(' || _rec1.query || ',' || ris || ');';
    2526                END LOOP;
    2627