Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 6 down vote accepted

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)
share|improve this answer
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 ? – simplexio 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_comme‌​nts.sql uninstall_postgis.sql – Gregory Dec 19 '12 at 23:06
in mentioned order – simplexio Dec 20 '12 at 8:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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