summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c68ba64)
raw | patch | inline | side by side (parent: c68ba64)
author | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 16 Mar 2011 11:26:50 +0000 (11:26 +0000) | ||
committer | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 16 Mar 2011 11:26:50 +0000 (11:26 +0000) |
debian squeeze) the default template database used for database
creation doesn't match the needed character encoding UTF8 -- a new
config option 'template' in the rdbms section now allows specification
of the template. You know you need this option if you get the error
message:
psycopg2.DataError: new encoding (UTF8) is incompatible with the
encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use
template0 as template.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4580 57a73879-2fb5-44c3-a270-3262357dd7e2
creation doesn't match the needed character encoding UTF8 -- a new
config option 'template' in the rdbms section now allows specification
of the template. You know you need this option if you get the error
message:
psycopg2.DataError: new encoding (UTF8) is incompatible with the
encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use
template0 as template.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4580 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/backends/back_postgresql.py | patch | blob | history | |
roundup/configuration.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 67b670203f21de008e94870e91a9dda400eefb65..6f33989585600f700f64e23738347f2f99023abf 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
(Ralf Schlatterbeck)
- Fix incorrect setting of template in customizing.txt example action,
patch via issue2550682 (thanks John Kristensen)
+- Configuration issue: On some postgresql 8.4 installations (notably on
+ debian squeeze) the default template database used for database
+ creation doesn't match the needed character encoding UTF8 -- a new
+ config option 'template' in the rdbms section now allows specification
+ of the template. You know you need this option if you get the error
+ message:
+ psycopg2.DataError: new encoding (UTF8) is incompatible with the
+ encoding of the template database (SQL_ASCII)
+ HINT: Use the same encoding as in the template database, or use
+ template0 as template.
+ (Ralf Schlatterbeck)
2010-10-08 1.4.16 (r4541)
index d43659e44bcb6a0c6927b3ab790b80399fa8f196..098126281449106c4afaa97885a4e2fa9aa031a8 100644 (file)
def db_create(config):
"""Clear all database contents and drop database itself"""
command = "CREATE DATABASE %s WITH ENCODING='UNICODE'"%config.RDBMS_NAME
+ if config.RDBMS_TEMPLATE :
+ command = command + " TEMPLATE=%s" % config.RDBMS_TEMPLATE
logging.getLogger('roundup.hyperdb').info(command)
db_command(config, command)
index 8e42cef1418840d171bb0753449acaed89c17d7b..b145e96ecc1d77ba77963ed80496786348174496 100644 (file)
--- a/roundup/configuration.py
+++ b/roundup/configuration.py
"Only used in SQLite connections."),
(IntegerNumberOption, 'cache_size', '100',
"Size of the node cache (in elements)"),
+ (NullableOption, 'template', '',
+ "Name of the PostgreSQL template for database creation.\n"
+ "For database creation the template used has to match\n"
+ "the character encoding used (UTF8), there are different\n"
+ "PostgreSQL installations using different templates with\n"
+ "different encodings. If you get an error:\n"
+ " new encoding (UTF8) is incompatible with the encoding of\n"
+ " the template database (SQL_ASCII)\n"
+ " HINT: Use the same encoding as in the template database,\n"
+ " or use template0 as template.\n"
+ "then set this option to the template name given in the\n"
+ "error message."),
), "Settings in this section are used"
" by RDBMS backends only"
),