- postgres no longer uses client-side cursors, uses more efficient server side
cursors via apparently undocumented psycopg2 behavior recently discovered on the
mailing list. disable it via create_engine('postgres://', client_side_cursors=True)
+ - mysql is inconsistent with what kinds of quotes it uses in foreign keys during a
+ SHOW CREATE TABLE, reflection updated to accomodate for all three styles [ticket:420]
- added "fetchmany()" support to ResultProxy
- added "BIGSERIAL" support for postgres table with PGBigInteger/autoincrement
- fixes to postgres reflection to better handle when schema names are present;
if match:
tabletype = match.group('ttype')
- fkpat = r'CONSTRAINT `(?P<name>.+?)` FOREIGN KEY \((?P<columns>.+?)\) REFERENCES `(?P<reftable>.+?)` \((?P<refcols>.+?)\)'
+ fkpat = r'''CONSTRAINT [`"'](?P<name>.+?)[`"'] FOREIGN KEY \((?P<columns>.+?)\) REFERENCES [`"'](?P<reftable>.+?)[`"'] \((?P<refcols>.+?)\)'''
for match in re.finditer(fkpat, desc):
- columns = re.findall(r'`(.+?)`', match.group('columns'))
- refcols = [match.group('reftable') + "." + x for x in re.findall(r'`(.+?)`', match.group('refcols'))]
+ columns = re.findall(r'''[`"'](.+?)[`"']''', match.group('columns'))
+ refcols = [match.group('reftable') + "." + x for x in re.findall(r'''[`"'](.+?)[`"']''', match.group('refcols'))]
schema.Table(match.group('reftable'), table.metadata, autoload=True, autoload_with=connection)
constraint = schema.ForeignKeyConstraint(columns, refcols, name=match.group('name'))
table.append_constraint(constraint)