From: Mike Bayer Date: Sun, 24 Nov 2013 00:17:22 +0000 (-0500) Subject: pg8000 fix for decimal return scale X-Git-Tag: rel_0_9_0~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=579f09974b4813f35fe0c701bbf678d5eccc4aeb;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git pg8000 fix for decimal return scale --- diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index cd9c545f30..6beb9fbef1 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -40,7 +40,8 @@ class _PGNumeric(sqltypes.Numeric): if self.asdecimal: if coltype in _FLOAT_TYPES: return processors.to_decimal_processor_factory( - decimal.Decimal, self.decimal_return_scale) + decimal.Decimal, + self._effective_decimal_return_scale) elif coltype in _DECIMAL_TYPES or coltype in _INT_TYPES: # pg8000 returns Decimal natively for 1700 return None