Creating extensions v3.2
After installing PostGIS, create a PostGIS database and the extensions in each database where you want to use PostGIS extensions. Don't create the extensions in the postgres or edb database.
Before creating the postgis database, we recommend creating a superuser to administer the database. To create the user, navigate to the bin directory under your EDB Postgres Advanced Server installation and connect to the server with the psql client:
Invoke the following command to create a privileged role:
Log out of psql and connect as gisadmin:
Invoke the following command to create the postgis database owned by gisadmin:
Use the
\c
command to switch to the postgis database, and use theCREATE EXTENSION
command to create the PostGIS extensions:
Note
The postgis-sfcgal extension isn't available on Ubuntu 18, Ubuntu 20, SLES 12, RHEL/CentOS 7 - ppc64le, and Windows platforms.
The postgis_raster extension isn't supported on SLES 15 x86 and SLES 15 PPCLE. On SLES 15 x86 and SLES 15 PPCLE, libOpenCL1 is required by GDAL and comes from the SUSE Linux Enterprise Workstation Extension 15 SP4 x86_64 repository.
When connected with pgAdmin, you can see PostGIS extensions, functions, tables, and trigger functions beneath the postgis database public schema. The postgis database is now geospatially enabled. You can use it as a template to create geospatial databases.