various postgresql and postgis scripts