Ticket #708: 708-1.diff
File 708-1.diff, 660 bytes (added by , 17 years ago) |
---|
-
django/db/backends/postgresql/operations.py
27 27 def deferrable_sql(self): 28 28 return " DEFERRABLE INITIALLY DEFERRED" 29 29 30 def field_cast_sql(self, db_type): 31 if db_type == 'inet': 32 return 'CAST(%s AS TEXT)' 33 return '%s' 34 30 35 def last_insert_id(self, cursor, table_name, pk_name): 31 36 cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" % (table_name, pk_name)) 32 37 return cursor.fetchone()[0]