developmentseed / tipg

Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.
https://developmentseed.org/tipg/
MIT License
149 stars 21 forks source link

CREATE Postgis Extenstion in dbcatalog.sql #125

Closed ranchodeluxe closed 11 months ago

ranchodeluxe commented 11 months ago

Is there some reason that the dbcatalog.sql can't also include the CREATE EXTENSION IF NOT EXISTS postgis; as part of it?

I know the image keys off of the POSTGRES_* creds to set up the DB. But there's an extra advantage to having the create extension logic for postgis there, namely, if I decide to not create another PG* user for the service and reuse POSTGRES_* to handle everything then I don't have to monkey with DB set up at all.

Thoughts?

vincentsarago commented 11 months ago

The dbcatalog.sql will be ran in the pg_temp schema, so I'm not sure this is possible 🤷

I'm def not against this if it's doable

cc @bitner

bitner commented 11 months ago

@ranchodeluxe The point of tipg is to expose an existing PostGIS enabled database with a user that could have no write permissions to the database at all (in fact -- best practice should be to only connect with a user that has no write permissions). It's been designed so that it does not need to modify or touch anything in the database at all other than the functions that it creates in a temporary tablespace.

I think that it is best left to wrappers such as eoAPI to deal with any kind of set up of the database including the installation of extensions such as PostGIS.