Permalink
Browse files

Added --locale=C to default postgres initdb.

  • Loading branch information...
1 parent ca28b3d commit 99acc398360d9e37af9ef97843ca1d2d6971ffba @wayneeseguin wayneeseguin committed Oct 31, 2011
Showing with 10 additions and 3 deletions.
  1. +2 −1 postgresql/map
  2. +8 −2 postgresql/shell/functions
View
@@ -2,7 +2,6 @@ backup/database=backup/database
backup/tables=backup/tables
conf/edit=conf/edit
conf/help=conf/help
-
package/help=package/help
package/install=package/package_install()
package/uninstall=package/package_uninstall()
@@ -12,3 +11,5 @@ service/restart=service/service_restart()
service/start=service/service_start()
service/status=service/service_status()
service/stop=service/service_stop()
+database/setup=postgresql_database_setup()
+database/init=postgresql_database_setup()
@@ -107,7 +107,7 @@ postgresql_kernel_parameters()
postgresql_database_setup()
{
- local _file _command
+ local _file _command _initdb_flags
log "Initializing postgresql data directory in $service_data_path"
path create "${service_data_path}"
@@ -126,7 +126,13 @@ postgresql_database_setup()
if ! path exists "${service_data_path}/data"
then
- _command="'$install_path/bin/initdb' --pgdata='${service_data_path}/data' --encoding=utf8 --username=$service_user"
+ _initdb_flags=(
+ --pgdata="'${service_data_path}/data'"
+ --encoding=utf8
+ --locale=C
+ --username=$service_user
+ )
+ _command="'$install_path/bin/initdb ${_initdb_flags[*]}'"
if user is root
then

0 comments on commit 99acc39

Please sign in to comment.