1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Removed unused DatabaseOperations.last_insert_id() on PostgreSQL.

Unused since 9eb2afddfa.
This commit is contained in:
Mariusz Felisiak 2017-08-01 22:53:17 +02:00 committed by Tim Graham
parent 2d136ede8a
commit 5d9034bc92

View File

@ -85,13 +85,6 @@ class DatabaseOperations(BaseDatabaseOperations):
return lookup
def last_insert_id(self, cursor, table_name, pk_name):
# Use pg_get_serial_sequence to get the underlying sequence name
# from the table name and column name (available since PostgreSQL 8)
cursor.execute("SELECT CURRVAL(pg_get_serial_sequence('%s','%s'))" % (
self.quote_name(table_name), pk_name))
return cursor.fetchone()[0]
def no_limit_value(self):
return None