8

The PostGIS installation documentation reads:

PostGIS is an optional extension that must be enabled in each database you want to use it in before you can use it. Installing the software is just the first step. DO NOT INSTALL it in the database called postgres.

We're running PostgreSQL in Docker and only need one database, so we've been using the default database, postgres. My first inclination was to install PostGIS there, but the documentation seems pretty clear that we shouldn't be doing that.

Is there a reason for PostGIS not to be installed on the default database, or is this note meant to deter people from accidentally installing PostGIS in the postgres database when their data is in the foobar database?

Thanks!

1
  • Is your data in the postgres database too? If so, won't that make upgrading hard? Commented Dec 22, 2015 at 21:11

1 Answer 1

8

There is no danger in installing PostGIS into the postgres database. The note is just so users don't confuse themselves, as you suspected.

Sign up to request clarification or add additional context in comments.

1 Comment

Perhaps, but if so the note should be updated to provide accurate information. Ex: please install postgis in a dedicated schema in order to prevent data corruption. Or: we recommend installing postigs in a dedicated "postgis" schema, though installation would technically succeed in any dedicated schema. By the way, I guess that installing postgis in the public schema, and data in another schema is also bad practice, because users could create tables in public schema by mistake.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.