5

I have a postgres 9.1 database with postgis 2.1, and I recently needed to add sfcgal to it, so i rebuilt postgis 2.1, but I can't find out how to update the postgis extension in postgres without dropping all data. Is there a way to do that ?

ALTER EXTENSION postgis UPDATE;

returns a notice saying i'm already at version 2.1.0

Thanks for any tips

4

just run the sfcgal.sql file into your existing database. Unfortunately, cgal is not packaged as an extension (actually, for exactly the reason your case demonstrates: you can't have two extensions with the same version and different capabilities).

  • May I suggest you clarify your answer by adding the commands psql -d database_name -a -f /usr/local/Cellar/postgis/2.1.7_1/share/postgis/sfcgal.sql and ALTER EXTENSION postgis UPDATE;? Otherwise nice answer ;) I think the other answer will be more relevant in the future. – n1000 Oct 13 '15 at 9:57
6

from the NEWS files in postgis repository, it seems that with postgis 2.2.0, SFCGAL can now be installed as its own extension using CREATE EXTENSION postgis_sfcgal

so this will be easier in the future ! :)

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.