diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-14 13:54:47 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-14 13:54:47 -0400 |
| commit | f9113b5dbfe5fec59759b1018465e729f6741167 (patch) | |
| tree | 88f06e5cdcf6dd5e1611322ed1eefcd6314dab59 /lib/sqlalchemy/dialects/postgresql/pg8000.py | |
| parent | e6fd32e17380dfe758050fab12987e14c46f70c4 (diff) | |
| download | sqlalchemy-f9113b5dbfe5fec59759b1018465e729f6741167.tar.gz | |
- Fixed support for precision numerics when using
pg8000. [ticket:2132]
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pg8000.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/pg8000.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index 44e095cdd..ac927edbb 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -56,6 +56,11 @@ class _PGNumeric(sqltypes.Numeric): raise exc.InvalidRequestError( "Unknown PG numeric type: %d" % coltype) + +class _PGNumericNoBind(_PGNumeric): + def bind_processor(self, dialect): + return None + class PGExecutionContext_pg8000(PGExecutionContext): pass @@ -94,7 +99,8 @@ class PGDialect_pg8000(PGDialect): colspecs = util.update_copy( PGDialect.colspecs, { - sqltypes.Numeric : _PGNumeric, + sqltypes.Numeric : _PGNumericNoBind, + sqltypes.Float : _PGNumeric } ) |
