Ticket #13295: postgresql_name_seq.diff

File postgresql_name_seq.diff, 1.1 KB (added by Max Shabalihin, 15 years ago)
  • sql/compiler.

    old new  
    785785            return
    786786        if self.connection.features.can_return_id_from_insert:
    787787            return self.connection.ops.fetch_returned_insert_id(cursor)
    788         return self.connection.ops.last_insert_id(cursor,
     788        if 'db_seq' in self.query.model._meta.__dict__:
     789            return self.connection.ops.last_insert_id(cursor,
     790                self.query.model._meta.db_seq, '')
     791        else:
     792            return self.connection.ops.last_insert_id(cursor,
    789793                self.query.model._meta.db_table, self.query.model._meta.pk.column)
    790794
    791795
  • options.

    old new  
    3030        self.module_name, self.verbose_name = None, None
    3131        self.verbose_name_plural = None
    3232        self.db_table = ''
     33        self.db_seq = ''
    3334        self.ordering = []
    3435        self.unique_together =  []
    3536        self.permissions =  []
Back to Top