- changed status to resolved
add "inet" type for pg
Issue #444
resolved
Index: lib/sqlalchemy/databases/postgres.py
===================================================================
--- lib/sqlalchemy/databases/postgres.py (revision 2199)
+++ lib/sqlalchemy/databases/postgres.py (working copy)
@@ -32,6 +32,10 @@
except:
psycopg = None
+class Inet(sqltypes.TypeEngine):
+ def get_col_spec(self):
+ return "INET"
+
class PGNumeric(sqltypes.Numeric):
def get_col_spec(self):
if not self.precision:
@@ -161,6 +165,7 @@
'numeric' : PGNumeric,
'float' : PGFloat,
'real' : PGFloat,
+ 'inet': Inet,
'double precision' : PGFloat,
'timestamp' : PG2DateTime,
'timestamp with time zone' : PG2DateTime,
Comments (1)
-
reporter - Log in to comment
called it
PGInet
for consistency. changeset:2330