SELECT util.search_path_append('util');

-- runtime: 25 s ("real 0m21.770s")
SELECT set_col_types(:table_str, ARRAY[
  ('decimallatitude', 'double precision')
, ('decimallongitude', 'double precision')
]::col_cast[]);

ALTER TABLE :table ALTER COLUMN decimallatitude SET NOT NULL;
ALTER TABLE :table ALTER COLUMN decimallongitude SET NOT NULL;

-- runtime: 55 s ("real 0m53.677s")
SELECT create_if_not_exists($$CREATE INDEX geoscrub_output_input ON geoscrub_output (decimallatitude, decimallongitude, country, stateprovince, county)$$);
