summaryrefslogtreecommitdiff
path: root/django/core/db/backends/postgresql.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-09 01:33:59 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-09 01:33:59 +0000
commit9f0deae2494f9e5e5d7a55b7fa46ef53c1ca34d7 (patch)
tree07bf7e79b8b2a0d3730326330d048717ec19ed7f /django/core/db/backends/postgresql.py
parent7d0bf5f2dcf34c7a28925e28fce67f44183dd77d (diff)
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
Diffstat (limited to 'django/core/db/backends/postgresql.py')
-rw-r--r--django/core/db/backends/postgresql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py
index c2eb072cdb..f70e8366f1 100644
--- a/django/core/db/backends/postgresql.py
+++ b/django/core/db/backends/postgresql.py
@@ -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):