]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
pg8000 fix for decimal return scale
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Nov 2013 00:17:22 +0000 (19:17 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Nov 2013 00:17:22 +0000 (19:17 -0500)
lib/sqlalchemy/dialects/postgresql/pg8000.py

index cd9c545f30cad86ea4ab6e9a11e85fe0085eba16..6beb9fbef139d125c975ced87094dcb749f7d747 100644 (file)
@@ -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