summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pypostgresql.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/pypostgresql.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pypostgresql.py b/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
index e7023610b..879bced45 100644
--- a/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
+++ b/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
@@ -18,6 +18,7 @@ from ... import types as sqltypes
from .base import PGDialect, PGExecutionContext
from ... import processors
+
class PGNumeric(sqltypes.Numeric):
def bind_processor(self, dialect):
return processors.to_str
@@ -28,9 +29,11 @@ class PGNumeric(sqltypes.Numeric):
else:
return processors.to_float
+
class PGExecutionContext_pypostgresql(PGExecutionContext):
pass
+
class PGDialect_pypostgresql(PGDialect):
driver = 'pypostgresql'
@@ -48,8 +51,10 @@ class PGDialect_pypostgresql(PGDialect):
colspecs = util.update_copy(
PGDialect.colspecs,
{
- sqltypes.Numeric : PGNumeric,
- sqltypes.Float: sqltypes.Float, # prevents PGNumeric from being used
+ sqltypes.Numeric: PGNumeric,
+
+ # prevents PGNumeric from being used
+ sqltypes.Float: sqltypes.Float,
}
)