Does your database require either raster or topology support? If not, then you already have spatially enabled your database with the enabler scripts, since postgis_full_version()
worked (ignore the NOTICE
unless you need this functionality).
Note that the CREATE EXTENSION postgis
is a different way to install PostGIS, which is not compatible to using enabler scripts (psql -f /path/to/postgis.sql
). If you prefer this method, then you need to build PostGIS with raster support (i.e. requires libgdal-dev
), and don't run the enabler scripts.
See related answer: https://stackoverflow.com/a/22998869/327026