CREATE INDEX IF NOT EXISTS country_capital_idx ON country (capital);
BEGIN TRANSACTION;
DELETE FROM country;
-COPY country FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/countryInfo.txt | grep -v "^#" | sed "s/\\\\/\\\\\\\\/g"' WITH (format 'text', NULL '');
+COPY country FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/countryInfo.txt \
+| grep -v "^#" \
+| sed "s/\\\\/\\\\\\\\/g" \
+' WITH (format 'text', NULL '');
COMMIT;
COPY geo FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/allCountries.zip \
| zcat \
| awk "{\$7=\$7\".\"\$8;print}" FS="\t" OFS="\t" \
-| cut -f -7,9-10,15-
+| cut -f -7,9-10,15- \
' WITH (format 'text', NULL '');
COMMIT;