]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
Allow for postgis being in the default template - not an error if it already is installed
[nominatim.git] / utils / setup.php
index 90374e74785175a146a9f567537c23aca5dfdb64..eff7b71b447fef7fd36bab87e3db8569fef84231 100755 (executable)
                        pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/postgis.sql');
                        pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/spatial_ref_sys.sql');
                } else {
-                       pgsqlRunScript('CREATE EXTENSION postgis');
+                       pgsqlRunScript('CREATE EXTENSION IF NOT EXISTS postgis');
                }
                if ($fPostgisVersion < 2.1) {
                        // Function was renamed in 2.1 and throws an annoying deprecation warning