fixed issue 976 with quoting in pg8000

This commit is contained in:
mdipierro
2012-09-04 15:09:02 -05:00
parent fe14686586
commit 450101be8e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.6 (2012-09-04 15:07:04) stable
Version 2.0.6 (2012-09-04 15:08:58) stable
+2 -2
View File
@@ -2379,9 +2379,9 @@ class PostgreSQLAdapter(BaseAdapter):
if self.driver_name == 'psycopg2':
return psycopg2_adapt(obj).getquoted()
elif self.driver_name == 'pg8000':
return str(obj).replace("%","%%").replace("'","''")
return "'%s'" % str(obj).replace("%","%%").replace("'","''")
else:
return str(obj).replace("'","''")
return "'%s'" % str(obj).replace("'","''")
def sequence_name(self,table):
return '%s_id_Seq' % table