From 8c01e3154f035d070ba8f510326b46fc984086aa Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 4 Dec 2009 16:19:31 +0100 Subject: [PATCH] Tweak create_postgresql_database.in --- bacula/src/cats/create_postgresql_database.in | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 624a8f1aba..5acd0b561d 100644 --- a/bacula/src/cats/create_postgresql_database.in +++ b/bacula/src/cats/create_postgresql_database.in @@ -6,31 +6,36 @@ bindir=@SQL_BINDIR@ db_name=@db_name@ +# # use SQL_ASCII to be able to put any filename into # the database even those created with unusual character sets ENCODING="ENCODING 'SQL_ASCII'" -# use UTF8 if you are using standard Unix/Linux LANG specifications -# that use UTF8 -- this is normally the default and *should* be -# your standard. Bacula works correctly *only* with correct UTF8. -# -# Note, with this encoding, if you have any "weird" filenames on -# your system (names generated from Win32 or Mac OS), you may -# get Bacula batch insert failures. # -#ENCODING="ENCODING 'UTF8'" - +# Please note: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# We do not recommend that you use ENCODING 'SQL_UTF8' +# It can result in creating filenames in the database that +# cannot be seen or restored. +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # -# KES: Note: the CREATE DATABASE, probably should be -# CREATE DATABASE ${db_name} $ENCODING TEMPLATE template0 # if $bindir/psql -f - -d template1 $* </dev/null; then + echo "Database encoding OK" +else + echo " " + echo "Database encoding bad. Do not use this database" + echo " " fi -exit 0 -- 2.39.5