Blame PyGreSQL-set-decimal.patch
|
Tom Lane |
5856a81 |
Upstream's fix for failure of set_decimal method (bug #719093).
|
|
Tom Lane |
5856a81 |
|
|
Tom Lane |
5856a81 |
|
|
Tom Lane |
5856a81 |
diff -Naur PyGreSQL-4.0.orig/pgdb.py PyGreSQL-4.0/pgdb.py
|
|
Tom Lane |
5856a81 |
--- PyGreSQL-4.0.orig/pgdb.py 2009-01-01 08:05:02.000000000 -0500
|
|
Tom Lane |
5856a81 |
+++ PyGreSQL-4.0/pgdb.py 2011-07-07 20:00:48.297013075 -0400
|
|
Tom Lane |
5856a81 |
@@ -95,13 +95,13 @@
|
|
Tom Lane |
5856a81 |
"""Get or set global type to be used for decimal values."""
|
|
Tom Lane |
5856a81 |
global Decimal
|
|
Tom Lane |
5856a81 |
if decimal_type is not None:
|
|
Tom Lane |
5856a81 |
- Decimal = decimal_type
|
|
Tom Lane |
5856a81 |
- set_decimal(decimal_type)
|
|
Tom Lane |
5856a81 |
+ _cast['numeric'] = Decimal = decimal_type
|
|
Tom Lane |
5856a81 |
+ set_decimal(Decimal)
|
|
Tom Lane |
5856a81 |
return Decimal
|
|
Tom Lane |
5856a81 |
|
|
Tom Lane |
5856a81 |
|
|
Tom Lane |
5856a81 |
def _cast_bool(value):
|
|
Tom Lane |
5856a81 |
- return value[:1] in ['t', 'T']
|
|
Tom Lane |
5856a81 |
+ return value[:1] in ('t', 'T')
|
|
Tom Lane |
5856a81 |
|
|
Tom Lane |
5856a81 |
|
|
Tom Lane |
5856a81 |
def _cast_money(value):
|