From Fedora Project Wiki
(Created page with " I needed to enable out of db rasters in postgis. Here is easy way how to do it using systemd dropin configuration. sudo -i mkdir -p /etc/systemd/system/postgresql.service....")
 
 
Line 11: Line 11:
 
  systemctl daemon-reload
 
  systemctl daemon-reload
 
  systemctl restart postgresql
 
  systemctl restart postgresql
 +
 +
How to load postgis extensions:
 +
 +
psql -d yourdatabase -c "CREATE EXTENSION postgis;"
 +
psql -d yourdatabase -c "CREATE EXTENSION postgis_topology;"
 +
psql -d yourdatabase -c "CREATE EXTENSION postgis_tiger_geocoder;"
 +
 +
Upgrade (could be real prolbem). You should have installed postgis-upgrade (with previous version of .so). It should be compiled against correct version of postgresql. (It is necessary to build postgresql-upgrade-devel )
 +
 +
ALTER EXTENSION postgis UPDATE TO "2.1.8dev";
 +
ALTER EXTENSION postgis_topology UPDATE TO "2.1.8dev";

Latest revision as of 12:48, 21 May 2015

I needed to enable out of db rasters in postgis. Here is easy way how to do it using systemd dropin configuration.

sudo -i
mkdir -p /etc/systemd/system/postgresql.service.d
echo <<<EOF
[Service]
Environment=POSTGIS_ENABLE_OUTDB_RASTERS=1
Environment=POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL
EOF > /etc/systemd/system/postgresql.service.d/dropin.conf
systemctl daemon-reload
systemctl restart postgresql

How to load postgis extensions:

psql -d yourdatabase -c "CREATE EXTENSION postgis;"
psql -d yourdatabase -c "CREATE EXTENSION postgis_topology;"
psql -d yourdatabase -c "CREATE EXTENSION postgis_tiger_geocoder;"

Upgrade (could be real prolbem). You should have installed postgis-upgrade (with previous version of .so). It should be compiled against correct version of postgresql. (It is necessary to build postgresql-upgrade-devel )

ALTER EXTENSION postgis UPDATE TO "2.1.8dev";
ALTER EXTENSION postgis_topology UPDATE TO "2.1.8dev";