]> dev.renevier.net Git - syj.git/blobdiff - scripts/updategeoip.sh
vacuum tables manually
[syj.git] / scripts / updategeoip.sh
index eb9327e23a22d1d9a8b72abf11f37c2af4baa233..1626bb3d65e75b8b103c0e13cd2d889438615732 100755 (executable)
@@ -81,3 +81,4 @@ unzip ${GEOIPDB##*/} $GEOIPCVS
 
 # insert all values from csv to database
 sed -e 's/"\([^"]\+\)","\([^"]\+\)","\([^"]\+\)","\([^"]\+\)","\([^"]\+\)","\([^"]\+\)"/INSERT INTO geoip (begin_ip, end_ip, country) VALUES ('\''\3'\'','\''\4'\'','\''\5'\'');/' $GEOIPCVS | psql --set "ON_ERROR_STOP=1" -f -
+psql --set "ON_ERROR_STOP=1" -c "VACUUM ANALYZE geoip;"