Kaydet (Commit) 9f0deae2 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed #1034 -- Changed get_last_insert_id to quote database table name. Thanks, rfugger

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 7d0bf5f2
......@@ -67,7 +67,7 @@ def dictfetchall(cursor):
return cursor.dictfetchall()
def get_last_insert_id(cursor, table_name, pk_name):
cursor.execute("SELECT CURRVAL('%s_%s_seq')" % (table_name, pk_name))
cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" % (table_name, pk_name))
return cursor.fetchone()[0]
def get_date_extract_sql(lookup_type, table_name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment