diff options
author | Michael Trier <mtrier@gmail.com> | 2008-07-03 03:40:23 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-07-03 03:40:23 +0000 |
commit | 0e857ffa32ebbb0886f2aaa2bf5a3f3d33545432 (patch) | |
tree | cdc3198f32f5814667e63c686f0cae6b411fa0d7 | |
parent | 5dc261c352550dfaa99d900bf625e0efdcb469a0 (diff) | |
download | sqlalchemy-0e857ffa32ebbb0886f2aaa2bf5a3f3d33545432.tar.gz |
Added PGCidr type to postgres. Closes #1092
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/postgres.py | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -49,6 +49,8 @@ CHANGES - 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. diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 0ab6dd8b4..d18fcf4c1 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -32,6 +32,10 @@ class PGInet(sqltypes.TypeEngine): 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" @@ -200,6 +204,7 @@ ischema_names = { 'float' : PGFloat, 'real' : PGFloat, 'inet': PGInet, + 'cidr': PGCidr, 'macaddr': PGMacAddr, 'double precision' : PGFloat, 'timestamp' : PGDateTime, |