POSTGRES_DATA_DIR=/var/lib/pgsql
POSTGRES_LOG=/var/log/pgsql
ENCODING=UNICODE
+LOCALE=${LANG:-C}
# Get service config
if [ -f /etc/sysconfig/postgresql ] ; then
echo -n "Specify encoding for pgsql database (eg: LATIN2, KOI8) [$ENCODING]: "
read new_encoding
ENCODING=${new_encoding:-$ENCODING}
+ echo -n "Specify locale for pgsql database (eg: pl_PL, de_DE) [$LOCALE]: "
+ read new_locale
+ LOCALE=${new_locale:-$LOCALE}
- show "Creating initial postgresql database using $ENCODING encoding"
+ show "Creating initial postgresql database using $ENCODING/$LOCALE encoding/locale"
started
# Create sample database
fi
+ LC_ALL=$LOCALE; export LC_ALL
TMPDIR=/tmp su - postgres -s /bin/sh -c "LD_LIBRARY_PATH=/usr/lib \
initdb --pgdata=$POSTGRES_DATA_DIR \
-L /usr/share/postgresql -E $ENCODING"