I installed Postgres on a Windows machine, downloaded the binary installer for PostGIS and installed it. I only have one version of Postgres, so there is no messing up possible.
Installing PostGIS using the binary installer is straight forward and you cannot mess up the installation directory either. it has to go into the Postgres directory.
Now, when I want to create the PostGIS extension I am getting the following error:
ERROR: could not open extension control file "C:/APPS/POSTGR~1/pg96/../pg96/share/postgresql/extension/postgis.control": No such file or directory
********** Error **********
ERROR: could not open extension control file "C:/APPS/POSTGR~1/pg96/../pg96/share/postgresql/extension/postgis.control": No such file or directory
SQL state: 58P01
Though when I go into the directory C:\APPS\PostgreSQL\pg96\share\extension
then I do have a postgis.control
file present.
How do I get the extension to work? I checked the content of the zipped PostGIS binaries and it looks like as if the structure is well preserved and all files are copied into the appropriate directories during the install process via the binary installer.
Get a list of all the extensions installed on a database by using the \dx command. For example, the output for \dx when run on the Databases for PostgreSQL default database shows the only installed extension.
To activate and use an extension, you must download and install the necessary files (if not delivered with the standard download) and issue the command CREATE EXTENSION <extension_name>; within an SQL client like psql . To control which extensions are already installed use: \dx within psql .
Each PSQL database table is a separate file with a default file extension of . mkd.
It seems that the case is still the same with latest versions of postgres (PostgreSQL-9.6.3-1-win64-bigsql.exe
) and postgis (postgis-bundle-pg96x64-setup-2.3.2-1.exe
). I copied the files around until all the paths could be resolved:
C:\PostgreSQL\pg96\share\extension
to C:\PostgreSQL\pg96\share\postgresql\extension
postgis_topology-2.3.dll
, postgis-2.3.dll
, rtpostgis-2.3.dll
, address_standardizer-2.3.dll
and ogr_fdw.dll
from C:\PostgreSQL\pg96\lib
to C:\PostgreSQL\pg96\lib\postgresql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With