0
votes

How can I install or enable postgis to do spatial queries for an existing database instance that already has data stored inside it? I have come across a few tutorials like this one that seem to suggest that the database needs to be empty before installing postgis with the CREATE EXTENSION statement. http://technobytz.com/install-postgis-postgresql-9-3-ubuntu.html

The postgresql version of my instance is 9.3.6

2

2 Answers

0
votes
psql -d your_db_name -f /usr/share/postgresql/9.3/extension/postgis--2.1.1.sql

It's point 5 in your cited tutorial.

0
votes

with the recommendation of the postgresql irc, I used CREATE EXTENSION postgis SCHEMA postgis; creating the extension in the same schema as your app could also work