def last_insert_id(self, cursor, table_name, pk_name):
        cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" % (table_name, pk_name))
        return cursor.fetchone()[0]
dataset/ETHPy150Open dcramer/django-compositepks/django/db/backends/postgresql/operations.py/DatabaseOperations.last_insert_id/original