I have OS X - El Capitan. I have installed PostGIS 2.2 (brew shows "postgis 2.2.0 already installed"). But when I run ALTER EXTENSION postgis UPDATE TO "2.2.0" - it returns - ERROR: extension "postgis" has no update path from version "2.1.8" to version "2.2.0".

So my problem is, I do not know how to set the update path.

2 Answers 2


Why does your PostGIS 2.2.0 seem to have an extra " or is that just a typo.

Try just doing


If you compiled PostGIS with raster support and installed, then the newest version will be 2.2.0 and should be picked up without specifying the version.

If that doesn't work, verify you do have the PostGIS 2.2.0 extension files. Not sure where they get installed on Mac, but they are usually in some folder called share/extension where that folder is relative to where the PostgreSQL binaries are installed.

  • I've just put it in the quotes here. I doesn't work, I've tried this. There should be a path set. I know where the new postgis is located, I just don't know how to set the path. Dec 8, 2015 at 6:43
  • You save my life.
    – Viet Tran
    Oct 11, 2018 at 7:49

I realise that this is an oldish post but I recently had a similar problem. It seems that the installer was faulty (on this note - be aware that not all installers include the new sfcgal 3D functions (see the documentation about compatibility issues before installing - but that is not the subject of this thread). The installer I used did install the correct files for my v9.5 cluster (just not my 9.3 cluster - strange but true).

This problem is described here for upgrading an earlier version. Following this advice, rather than edit a file, I simply copied this file: postgis--2.1.8--2.2.1.sql (in my case) from my extensions folder for 9.5 into the equivalent folder for v9.3. The upgrade in 9.3 then worked successfully (confirmed by SELECT PostGIS_full_version();). My point about installers is that it may be worth trying another installer (EnterpriseDB worked well for me on Windows and since these are just SQL files you could do that and copy the files between machines) if you don't want to edit files as the documentation is not particularly lucid as to exactly what to edit and whether it is just the file name or some of the contents of the file itself.

In my case (Ubuntu Trusty), the path to the directory was actually /usr/share/postgresql/9.3/extension. On my windows machine it is where the documentation says it is (it seems typical of Ubuntu installs that files are scattered to the four winds).

Finally, you will also want to upgrade the versions of postgis_tiger_geocoder and postgis_topology if you are using them and can do this in the same way. If you don't, when you will get a warning about 'base version' on ALTER TABLE and the full text of the output from checking your version will contain a note that topology procs need to be upgraded. So a full command would be:

ALTER EXTENSION postgis_tiger_geocoder UPDATE TO "2.2.1";
ALTER EXTENSION postgis_topology UPDATE TO "2.2.1"; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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