Global Default Locale Configuration for PostgreSQL Databases #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
This Pull Request introduces a refinement to the
Ensure PostgreSQL databases are present
task, providing an option for setting a global default locale. While the existing role does permit locale modification at the individual database level, I observed that there are use cases where one might need to change the default locale across all databases without having to specifylc_collate
andlc_ctype
for each one. This led me to propose this enhancement.The following lines in
databases.yml
have been updated to use the newpostgresql_default_locale
variable when individuallc_collate
andlc_ctype
values are not provided:I have added the
postgresql_default_locale
variable to thedefaults/main.yml
file. This new variable allows users to define a global default locale:Additionally, I have updated the README to explain the purpose of this new variable and how to use it. The documentation clarifies that
postgresql_default_locale
is used to set defaultlc_collate
andlc_ctype
values for all databases, unless specifically overridden for a particular database.This modification aims to increase the role's versatility and simplify PostgreSQL database configuration by offering a global default locale setting.
I look forward to hearing your thoughts on this proposed change.
Thank you.