Skip to content

Instantly share code, notes, and snippets.

@iljya
iljya / map.svg
Last active February 12, 2021 14:13
Mapserver ANCHORPOINTS with SVG symbols, SVG output - What's going on?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iljya
iljya / square.svg
Created February 17, 2021 18:57
Mapserver: Symbol and Label collisions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
-- Create a query to delete all tables with a certain field name.
select array_to_string(array_agg(cmd), '; ') from (
select concat('DROP TABLE "', t.table_name, '"') as cmd
from information_schema.tables t
inner join information_schema.columns c on c.table_name = t.table_name
and c.table_schema = t.table_schema
where c.column_name = 'geometry'
and t.table_schema not in ('information_schema', 'pg_catalog')
and t.table_type = 'BASE TABLE'
order by t.table_schema) as cmds