-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF8 is assumed as default #3
Comments
Interesting -- I wasn't aware of that option in postgres. I think it makes sense to switch it to template0. |
Yeah, I did not know about it eighter since I almost always use UTF8 anyway. But I realized I had to set LANG=C.UTF-8 when I created this Docker image Unfortunately I didn't learn how to make all the tests this cookbook require or I could probably have committed something on this |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Not a big problem, but I noted that UTF8 is assumed as default in templates when creating Postgres database. If template0 is used during creation I think it will work better.
database.rb should probably look something like this:
postgresql_database settings['database']['name'] do
connection database_connection
connection_limit '-1'
encoding 'utf8'
template 'template0'
action :create
end
From http://www.postgresql.org/docs/9.0/static/manage-ag-templatedbs.html
"Another common reason for copying template0 instead of template1 is that new encoding and locale settings can be specified when copying template0, whereas a copy of template1 must use the same settings it does. This is because template1 might contain encoding-specific or locale-specific data, while template0 is known not to."
The text was updated successfully, but these errors were encountered: