]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
added PGInet type [ticket:444]
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Feb 2007 02:36:11 +0000 (02:36 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Feb 2007 02:36:11 +0000 (02:36 +0000)
CHANGES
lib/sqlalchemy/databases/postgres.py

diff --git a/CHANGES b/CHANGES
index 05b9e49a19b028a1745df0ecd99f948931c75748..1862260513af2d6228d154e9092c2fa803638fc3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -54,7 +54,7 @@
 - postgres:
   - better reflection of sequences for alternate-schema Tables [ticket:442]
   - sequences on a non-pk column will properly fire off on INSERT
-  - added PGInterval type [ticket:460]
+  - added PGInterval type [ticket:460], PGInet type [ticket:444]
 - ext:
   - added distinct() method to SelectResults.  generally should only make a difference
   when using count().
index 24c250f7a1cbdca356ba12fded66ed5022380fb2..b76aafc222024b3c42557d5a46364173c7498f9c 100644 (file)
@@ -32,6 +32,10 @@ except:
     except:
         psycopg = None
 
+class PGInet(sqltypes.TypeEngine):
+    def get_col_spec(self):
+        return "INET"
+
 class PGNumeric(sqltypes.Numeric):
     def get_col_spec(self):
         if not self.precision:
@@ -164,6 +168,7 @@ pg2_ischema_names = {
     'numeric' : PGNumeric,
     'float' : PGFloat,
     'real' : PGFloat,
+    'inet': PGInet,
     'double precision' : PGFloat,
     'timestamp' : PG2DateTime,
     'timestamp with time zone' : PG2DateTime,