comparison roundup/backends/back_postgresql.py @ 3475:addbe69ff58b

enforce correct encoding of PostgreSQL backend [SF#1374235]
author Richard Jones <richard@users.sourceforge.net>
date Fri, 20 Jan 2006 02:27:12 +0000
parents 3518d1ffd940
children bfb120928309
comparison
equal deleted inserted replaced
3473:370bb8f3c4d1 3475:addbe69ff58b
1 #$Id: back_postgresql.py,v 1.30 2005-05-02 05:48:59 richard Exp $ 1 #$Id: back_postgresql.py,v 1.31 2006-01-20 02:27:12 richard Exp $
2 # 2 #
3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> 3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt>
4 # 4 #
5 # This module is free software, and you may redistribute it and/or modify 5 # This module is free software, and you may redistribute it and/or modify
6 # under the same terms as Python, so long as this copyright message and 6 # under the same terms as Python, so long as this copyright message and
25 del d['read_default_file'] 25 del d['read_default_file']
26 return d 26 return d
27 27
28 def db_create(config): 28 def db_create(config):
29 """Clear all database contents and drop database itself""" 29 """Clear all database contents and drop database itself"""
30 command = 'CREATE DATABASE %s'%config.RDBMS_NAME 30 command = "CREATE DATABASE %s WITH ENCODING='UNICODE'"%config.RDBMS_NAME
31 logging.getLogger('hyperdb').info(command) 31 logging.getLogger('hyperdb').info(command)
32 db_command(config, command) 32 db_command(config, command)
33 33
34 def db_nuke(config, fail_ok=0): 34 def db_nuke(config, fail_ok=0):
35 """Clear all database contents and drop database itself""" 35 """Clear all database contents and drop database itself"""

Roundup Issue Tracker: http://roundup-tracker.org/