document how to install pgxn extensions
I am pretty sure, that's only possible using a separate docker image and "RUN pgxn install ...". If you think that ought to be documented, I can supply an example and write some documentation.
@bparees setting P2, we really need to document how you can add extensions to postgres (postgis was a hot topic in v2)...
@ibotty yes that's correct, you'd have to add a layer, so something like:
FROM centos/postgresql-94-centos7
USER root
RUN command to install extension
USER 26
a pull to the readme would be quite welcome.
This works for me:
cat Dockerfile
FROM registry.access.redhat.com/rhscl/postgresql-10-rhel7
USER root
RUN mkdir -p ${CONTAINER_SCRIPTS_PATH}/init
COPY install-uuid-ossp.sh ${CONTAINER_SCRIPTS_PATH}/init/install-uuid-ossp.sh
RUN chmod +x ${CONTAINER_SCRIPTS_PATH}/init/install-uuid-ossp.sh
USER 26
cat install-uuid-ossp.sh
psql -U postgres template1 -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";'
My application requires the pg_trgm extension. Is the only mechanism for adding an extension to create a new image as described in the above comment?
I am using openshift online as basis of tutorial and had wanted to simply use the postgresql in the catalog (with the nice UI flow). For my case, should I just have the user change the namespace to my project and have them import the image beforehand?
Any advice welcome, thanks!
Edit: Since I can rsh/terminal into the pod, I can add the extension manually. This is acceptable for the tutorial flow.