diff options
| -rw-r--r-- | CHANGES | 5 | ||||
| -rw-r--r-- | lib/sqlalchemy/databases/postgres.py | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -5,7 +5,10 @@ CHANGES 0.4.2p4 ------ - +- dialects + - finally added PGMacAddr type to postgres + [ticket:580] + 0.4.2p3 ------ - general diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 3c0314e64..6d29430b9 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -31,6 +31,10 @@ from sqlalchemy import types as sqltypes class PGInet(sqltypes.TypeEngine): def get_col_spec(self): return "INET" + +class PGMacAddr(sqltypes.TypeEngine): + def get_col_spec(self): + return "MACADDR" class PGNumeric(sqltypes.Numeric): def get_col_spec(self): @@ -181,6 +185,7 @@ ischema_names = { 'float' : PGFloat, 'real' : PGFloat, 'inet': PGInet, + 'macaddr': PGMacAddr, 'double precision' : PGFloat, 'timestamp' : PGDateTime, 'timestamp with time zone' : PGDateTime, |
