comparison roundup/backends/back_postgresql.py @ 3739:f1363e19121a

fix error detection for non-EN locales of postgres [SF#1592249]
author Richard Jones <richard@users.sourceforge.net>
date Thu, 09 Nov 2006 00:55:33 +0000
parents 5770f1802cd0
children bb30bbfc7cdd
comparison
equal deleted inserted replaced
3738:7d1ab8c03049 3739:f1363e19121a
1 #$Id: back_postgresql.py,v 1.36 2006-10-03 23:28:51 richard Exp $ 1 #$Id: back_postgresql.py,v 1.37 2006-11-09 00:55:33 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
129 self.conn, self.cursor = self.sql_open_connection() 129 self.conn, self.cursor = self.sql_open_connection()
130 130
131 try: 131 try:
132 self.load_dbschema() 132 self.load_dbschema()
133 except psycopg.ProgrammingError, message: 133 except psycopg.ProgrammingError, message:
134 if str(message).find('"schema" does not exist') == -1: 134 if str(message).find('schema') == -1:
135 raise 135 raise
136 self.rollback() 136 self.rollback()
137 self.init_dbschema() 137 self.init_dbschema()
138 self.sql("CREATE TABLE schema (schema TEXT)") 138 self.sql("CREATE TABLE schema (schema TEXT)")
139 self.sql("CREATE TABLE dual (dummy integer)") 139 self.sql("CREATE TABLE dual (dummy integer)")

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