aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD'Arcy J.M. Cain <darcy@druid.net>2003-02-26 13:16:50 +0000
committerD'Arcy J.M. Cain <darcy@druid.net>2003-02-26 13:16:50 +0000
commit9ff872a27233d5e02e55e9572a4b8161e0186cba (patch)
tree896af3eaad168747ab46cbf3145c41be3cde101b
parent84666801ed0e787e8b373c6eee18553b27aa574c (diff)
downloadpostgresql-9ff872a27233d5e02e55e9572a4b8161e0186cba.tar.gz
postgresql-9ff872a27233d5e02e55e9572a4b8161e0186cba.zip
The quote function should return a string suitable for dropping into a
query string. This fixes a bug where bool types sometimes returned with a string that could not be dropped into a query.
-rw-r--r--src/interfaces/python/pg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/python/pg.py b/src/interfaces/python/pg.py
index 0e40a6e5a47..5fd36eed344 100644
--- a/src/interfaces/python/pg.py
+++ b/src/interfaces/python/pg.py
@@ -29,7 +29,7 @@ def _quote(d, t):
if t == 'bool':
# Can't run upper() on these
- if d in (0, 1): return ('f', 't')[d]
+ if d in (0, 1): return ("'f'", "'t'")[d]
if string.upper(d) in ['T', 'TRUE', 'Y', 'YES', '1', 'ON']:
return "'t'"