Files
data-services/geocoder/ip-addresses/sql/build_data_table.sql
Juan Ignacio Sánchez Lara 1614495919 Final instructions
2018-05-11 12:53:45 +02:00

9 lines
319 B
SQL

---- IP addresses table ---
-- Clear table
DELETE FROM ip_address_locations;
-- Updates table with new source data
INSERT INTO ip_address_locations (the_geom, network_start_ip) SELECT the_geom, ('::ffff:' || split_part(network, '/', 1))::inet FROM latest_ip_address_locations;
DROP TABLE latest_ip_address_locations;