Commits

Michael Trier  committed ab47dec

Added PGCidr type to postgres. Closes #1092

  • Participants
  • Parent commits f41a0c7
  • Branches rel_0_4

Comments (0)

Files changed (2)

     - Repaired server_side_cursors to properly detect 
       text() clauses.
 
+    - Added PGCidr type. [ticket:1092] 
+
 - mysql
     - Added 'CALL' to the list of SQL keywords which return
       result rows.

File lib/sqlalchemy/databases/postgres.py

     def get_col_spec(self):
         return "INET"
 
+class PGCidr(sqltypes.TypeEngine):
+    def get_col_spec(self):
+        return "CIDR"
+
 class PGMacAddr(sqltypes.TypeEngine):
     def get_col_spec(self):
         return "MACADDR"
     'float' : PGFloat,
     'real' : PGFloat,
     'inet': PGInet,
+    'cidr': PGCidr,
     'macaddr': PGMacAddr,
     'double precision' : PGFloat,
     'timestamp' : PGDateTime,