changeset 3977:732a37da3a10

Fix for postgres 8.3 compatibility (and bug) (patch [SF#2030479])
author Richard Jones <richard@users.sourceforge.net>
date Thu, 07 Aug 2008 05:50:03 +0000
parents 7dc74da6c3e8
children f11fe2a13234
files CHANGES.txt roundup/backends/back_postgresql.py roundup/backends/rdbms_common.py
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Wed Jul 23 03:04:44 2008 +0000
+++ b/CHANGES.txt	Thu Aug 07 05:50:03 2008 +0000
@@ -7,6 +7,7 @@
 - xml-rpc security checks and tests across all backends (sf #1907211)
 - Send a Precedence header in email so autoresponders don't
 - Fix mailgw total failure bounce message generation (thanks  Bradley Dean)
+- Fix for postgres 8.3 compatibility (and bug) (sf patch #2030479)
 
 
 2008-03-01 1.4.4
--- a/roundup/backends/back_postgresql.py	Wed Jul 23 03:04:44 2008 +0000
+++ b/roundup/backends/back_postgresql.py	Thu Aug 07 05:50:03 2008 +0000
@@ -1,4 +1,4 @@
-#$Id: back_postgresql.py,v 1.43 2007-09-28 15:15:06 jpend Exp $
+#$Id: back_postgresql.py,v 1.44 2008-08-07 05:50:03 richard Exp $
 #
 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt>
 #
@@ -261,7 +261,7 @@
     def newid(self, classname):
         sql = "select nextval('_%s_ids') from dual"%classname
         self.sql(sql)
-        return self.cursor.fetchone()[0]
+        return str(self.cursor.fetchone()[0])
 
     def setid(self, classname, setid):
         sql = "select setval('_%s_ids', %s) from dual"%(classname, int(setid))
--- a/roundup/backends/rdbms_common.py	Wed Jul 23 03:04:44 2008 +0000
+++ b/roundup/backends/rdbms_common.py	Thu Aug 07 05:50:03 2008 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-#$Id: rdbms_common.py,v 1.196 2008-02-27 08:32:50 richard Exp $
+#$Id: rdbms_common.py,v 1.197 2008-08-07 05:50:03 richard Exp $
 """ Relational database (SQL) backend common code.
 
 Basics:
@@ -1920,7 +1920,7 @@
         # sqlite)
         sql = "select id from _%s where _%s=%s and __retired__=%s"%(
             self.classname, self.key, self.db.arg, self.db.arg)
-        self.db.sql(sql, (keyvalue, 0))
+        self.db.sql(sql, (str(keyvalue), 0))
 
         # see if there was a result that's not retired
         row = self.db.sql_fetchone()

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