CircleCI-Public / cimg-postgres

MIT License
8 stars 25 forks source link

PostGIS images do not have the PostGIS extension enabled #79

Closed fritzdj closed 1 year ago

fritzdj commented 1 year ago

When using the 14.6-postgis image for example, we are seeing the following error when attempting to use the PostGIS extension:

ERROR:  function postgis_version() does not exist at character 8
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT:  SELECT PostGIS_version();

We didn't realize at first that CREATE EXTENSION postgis; needs to run in order to use the extension. Is this expected or is this something that should be included as part of the image OOTB (i.e. how postgis/postgis handles it)?

JalexChen commented 1 year ago

hi @fritzdj - currently yes, this is expected. we provide the variant with the postgis packages installed, but you would still need to initialize and create the extension within the database itself.

as for automatically enabling it, i can take a look into implementing that

JalexChen commented 1 year ago

hi @fritzdj - i shouldn't have closed this out, but there is a PR #87 to enable the postgis extension out of the box.