Merge lp:~gnuoy/ubuntu-geonames/switch-indexes-in into lp:ubuntu-geonames

Proposed by Liam Young
Status: Merged
Merged at revision: 28
Proposed branch: lp:~gnuoy/ubuntu-geonames/switch-indexes-in
Merge into: lp:ubuntu-geonames
Diff against target: 29 lines (+8/-4)
1 file modified
import-geonames.sh (+8/-4)
To merge this branch: bzr merge lp:~gnuoy/ubuntu-geonames/switch-indexes-in
Reviewer Review Type Date Requested Status
Ubuntu Geonames Hackers Pending
Review via email: mp+185505@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'import-geonames.sh'
2--- import-geonames.sh 2013-09-13 10:34:31 +0000
3+++ import-geonames.sh 2013-09-13 14:16:48 +0000
4@@ -144,6 +144,10 @@
5 INSERT INTO continentCodes${LOAD_POSTFIX} VALUES ('OC', 'Oceania', 6255150);
6 INSERT INTO continentCodes${LOAD_POSTFIX} VALUES ('SA', 'South America', 6255151);
7 INSERT INTO continentCodes${LOAD_POSTFIX} VALUES ('AN', 'Antarctica', 6255152);
8+CREATE INDEX geoname_id_idx${LOAD_POSTFIX} ON geoname${LOAD_POSTFIX}(geonameid);
9+CREATE INDEX geoname_admin1codes_code_idx${LOAD_POSTFIX} ON admin1codes${LOAD_POSTFIX}(code);
10+CREATE INDEX geoname_countryinfo_isoalpha2_idx${LOAD_POSTFIX} ON countryinfo${LOAD_POSTFIX}(iso_alpha2);
11+CREATE INDEX geoname_alternatename_idx${LOAD_POSTFIX} ON alternatename${LOAD_POSTFIX}(alternatenameId);
12 COMMIT;
13 EOT
14
15@@ -186,10 +190,10 @@
16 ALTER TABLE admin1codes${LOAD_POSTFIX} RENAME TO admin1codes;
17 ALTER TABLE timeZones${LOAD_POSTFIX} RENAME TO timeZones;
18 ALTER TABLE continentCodes${LOAD_POSTFIX} RENAME TO continentCodes;
19-CREATE INDEX geoname_id_idx ON geoname(geonameid);
20-CREATE INDEX geoname_admin1codes_code_idx ON admin1codes(code);
21-CREATE INDEX geoname_countryinfo_isoalpha2_idx ON countryinfo(iso_alpha2);
22-CREATE INDEX geoname_alternatename_idx ON alternatename(alternatenameId);
23+ALTER INDEX geoname_id_idx${LOAD_POSTFIX} RENAME TO geoname_id_idx;
24+ALTER INDEX geoname_admin1codes_code_idx${LOAD_POSTFIX} RENAME TO geoname_admin1codes_code_idx;
25+ALTER INDEX geoname_countryinfo_isoalpha2_idx${LOAD_POSTFIX} RENAME TO geoname_countryinfo_isoalpha2_idx;
26+ALTER INDEX geoname_alternatename_idx${LOAD_POSTFIX} RENAME TO geoname_alternatename_idx;
27 GRANT ALL PRIVILEGES ON geoname, admin1codes, countryInfo, alternatename TO $PGUSER;
28 GRANT SELECT ON geoname, admin1codes, countryInfo, alternatename TO public;
29 COMMIT;

Subscribers

People subscribed via source and target branches

to all changes: