docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.14k stars 1.11k forks source link

rename schema from environment variable #1180

Open stmtk1 opened 6 months ago

stmtk1 commented 6 months ago

In this image, the environment variables POSTGRES_DB, POSTGRES_USER and POSTGRES_PASSWORD can be used to change the database name, user name and password name, but not the schema name. So we want to be able to change the schema name using the new environment variable POSTGRES_SCHEMA.

tianon commented 6 months ago

Does the default schema change anything about the way the initialization we perform works? (my gut reaction would be to suggest an early-initdb .sql file drop-in that does something like ALTER SCHEMA xxx RENAME TO yyy)