From d3581d1c09df4e9da2c16ec75bde73e69f44c487 Mon Sep 17 00:00:00 2001 From: Michael Trier Date: Thu, 3 Jul 2008 04:21:13 +0000 Subject: [PATCH] Added PGCidr type to postgres. Closes #1092 (cherry picked from commit 2394a6bb6c5f77afd448640ce03cf6fda0335a23) --- CHANGES | 2 ++ lib/sqlalchemy/databases/postgres.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 5a193fbb3f..50a988c070 100644 --- a/CHANGES +++ b/CHANGES @@ -164,6 +164,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 c30ca8b287..944d8c3aaa 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" @@ -206,6 +210,7 @@ ischema_names = { 'float' : PGFloat, 'real' : PGFloat, 'inet': PGInet, + 'cidr': PGCidr, 'macaddr': PGMacAddr, 'double precision' : PGFloat, 'timestamp' : PGDateTime, -- 2.47.3