]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- what about NOT using UNICODE as initdb encoding? (hardcoded -E UNICODE)
authorromke <romke@pld-linux.org>
Sat, 23 Jul 2005 13:30:44 +0000 (13:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  changes supporting sysconfig PG_INITDB_ENCODING to alter initdb encoding.

Changed files:
    postgresql.init -> 1.65
    postgresql.sysconfig -> 1.20

postgresql.init
postgresql.sysconfig

index 8cabf3528d52664117a78e224c066f9fc25cf3e5..8566255edf057a1bab0f7047e5d6b47fc81e2376 100644 (file)
@@ -18,6 +18,9 @@ cd /
 # Get network config
 . /etc/sysconfig/network
 
+# Preconfigure some variables:
+PG_INITDB_ENCODING=UNICODE
+
 # Get service config
 if [ -f /etc/sysconfig/postgresql ]; then
        . /etc/sysconfig/postgresql
@@ -216,7 +219,12 @@ case "$action" in
                        mkdir -p $pgdir
                        chmod 700 $pgdir
                        chown postgres:postgres $pgdir
-                       TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE -D $pgdir"
+                       if [ "x${PG_INITDB_ENCODING}x" != "xx" ]; then
+                               TMPENC="-E ${PG_INITDB_ENCODING}"
+                       else
+                               TMPENC=
+                       fi
+                       TMPDIR=/tmp su postgres -s /bin/sh -c "initdb ${TMPENC} -D $pgdir"
                fi
        done
        echo $(nls "REMEMBER to setup password for user \"postgres\"")'!'
index e837eaa1a3b6d809e17d5e23c90c9e8586a4738d..5f37ecfe834872f3284a4755cb4f0154276d22d5 100644 (file)
@@ -6,6 +6,11 @@
 # you should change TCP/IP port, at least.
 #
 
+# if you want change default initdb encoding use (value WITHOUT QUOTES!):
+# PG_INITDB_ENCODING=UNICODE
+# e.g. if you want use database default encoding use:
+# PG_INITDB_ENCODING=
+
 # standard setting
 PG_DB_CLUSTERS="/var/lib/pgsql"
 
This page took 0.046561 seconds and 4 git commands to generate.