Skip to content

Commit 204409d

Browse files
author
Richard Jones
committed
Fix for postgres 8.3 compatibility (and bug) (patch [SF#2030479])
1 parent f0b3f5f commit 204409d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Fixed:
77
- xml-rpc security checks and tests across all backends (sf #1907211)
88
- Send a Precedence header in email so autoresponders don't
99
- Fix mailgw total failure bounce message generation (thanks Bradley Dean)
10+
- Fix for postgres 8.3 compatibility (and bug) (sf patch #2030479)
1011

1112

1213
2008-03-01 1.4.4

roundup/backends/back_postgresql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: back_postgresql.py,v 1.43 2007-09-28 15:15:06 jpend Exp $
1+
#$Id: back_postgresql.py,v 1.44 2008-08-07 05:50:03 richard Exp $
22
#
33
# Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <[email protected]>
44
#
@@ -261,7 +261,7 @@ def drop_class_table(self, cn):
261261
def newid(self, classname):
262262
sql = "select nextval('_%s_ids') from dual"%classname
263263
self.sql(sql)
264-
return self.cursor.fetchone()[0]
264+
return str(self.cursor.fetchone()[0])
265265

266266
def setid(self, classname, setid):
267267
sql = "select setval('_%s_ids', %s) from dual"%(classname, int(setid))

roundup/backends/rdbms_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: rdbms_common.py,v 1.196 2008-02-27 08:32:50 richard Exp $
18+
#$Id: rdbms_common.py,v 1.197 2008-08-07 05:50:03 richard Exp $
1919
""" Relational database (SQL) backend common code.
2020
2121
Basics:
@@ -1920,7 +1920,7 @@ def lookup(self, keyvalue):
19201920
# sqlite)
19211921
sql = "select id from _%s where _%s=%s and __retired__=%s"%(
19221922
self.classname, self.key, self.db.arg, self.db.arg)
1923-
self.db.sql(sql, (keyvalue, 0))
1923+
self.db.sql(sql, (str(keyvalue), 0))
19241924

19251925
# see if there was a result that's not retired
19261926
row = self.db.sql_fetchone()

0 commit comments

Comments
 (0)