I've installed PostGIS (ver. 2.0.1) on my Mac using EnterpriseDB's StackBuilder, which I also used for my PostgreSQL (9.2.2) installation. Although StackBuilder says that PostGIS is now installed, and although I have a PostGIS directory in /usr/local/PostgreSQL/9.2/, it doesn't appear to be actually installed (see queries below).

gregory=# select postgis_full_version();
ERROR:  function postgis_full_version() does not exist
LINE 1: select postgis_full_version();
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

gregory=# create extension postgis;
ERROR:  could not open extension control file "/usr/local/PostgreSQL/9.2/share/postgresql/extension/postgis.control": No such file or directory

and select * from pg_available_extensions; does not return a record for PostGIS.

Does anyone know what's up with this and how to get it to work?


I think you need to load the postgis extension to your database like


or load these files to your query window and run them in database

windows default: 
\Program files\Postgresql\8.4\share\contrib\postgis-2.0

topology.sql (if you want topology support)
  • Command create extension postgis doesn't find what it needs to run (as noted in original post) and the PostGIS directory tree installed by StackBuilder contains no .sql files. – Gregory Dec 19 '12 at 14:03
  • Have you tried to search those files from hard disk ? – simpleuser001 Dec 19 '12 at 14:09
  • I just found the following files. Should I run them all (except the uninstalls) and does order matter? legacy.sql postgis_comments.sql rtpostgis.sql spatial_ref_sys.sql topology_upgrade_20_minor.sql uninstall_rtpostgis.sql legacy_minimal.sql postgis_upgrade_20_minor.sql rtpostgis_legacy.sql topology.sql uninstall_legacy.sql uninstall_topology.sql postgis.sql raster_comments.sql rtpostgis_upgrade_20_minor.sql topology_comments.sql uninstall_postgis.sql – Gregory Dec 19 '12 at 23:06
  • in mentioned order – simpleuser001 Dec 20 '12 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.