If the user is on a system where en_US.UTF-8 isn't the default collation, attempting to create_db will fail with an error like:
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template
database (C)
HINT: Use the same collation as in the template database, or use template0 as template.
One solution which seems to work is to specify the template from which the database should be built. So, we'd replace this line:
If the user is on a system where
en_US.UTF-8
isn't the default collation, attempting to create_db will fail with an error like:One solution which seems to work is to specify the template from which the database should be built. So, we'd replace this line:
with
Solution reference: http://stackoverflow.com/questions/18870775/how-to-change-the-template-database-collection-coding-on-postgresql