Ticket #708: 708-1.diff

File 708-1.diff, 660 bytes (added by Matt McClanahan, 17 years ago)
  • django/db/backends/postgresql/operations.py

     
    2727    def deferrable_sql(self):
    2828        return " DEFERRABLE INITIALLY DEFERRED"
    2929
     30    def field_cast_sql(self, db_type):
     31        if db_type == 'inet':
     32            return 'CAST(%s AS TEXT)'
     33        return '%s'
     34
    3035    def last_insert_id(self, cursor, table_name, pk_name):
    3136        cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" % (table_name, pk_name))
    3237        return cursor.fetchone()[0]
Back to Top