summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 42ec19c20..35f335252 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -409,6 +409,15 @@ class MACADDR(sqltypes.TypeEngine):
PGMacAddr = MACADDR
+class OID(sqltypes.TypeEngine):
+ """Provide the Postgresql OID type.
+
+ .. versionadded:: 0.9.5
+
+ """
+ __visit_name__ = "OID"
+
+
class TIMESTAMP(sqltypes.TIMESTAMP):
def __init__(self, timezone=False, precision=None):
super(TIMESTAMP, self).__init__(timezone=timezone)
@@ -1080,6 +1089,7 @@ ischema_names = {
'bit': BIT,
'bit varying': BIT,
'macaddr': MACADDR,
+ 'oid': OID,
'double precision': DOUBLE_PRECISION,
'timestamp': TIMESTAMP,
'timestamp with time zone': TIMESTAMP,
@@ -1353,6 +1363,9 @@ class PGTypeCompiler(compiler.GenericTypeCompiler):
def visit_MACADDR(self, type_):
return "MACADDR"
+ def visit_OID(self, type_):
+ return "OID"
+
def visit_FLOAT(self, type_):
if not type_.precision:
return "FLOAT"