projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8466680
)
The quote function should return a string suitable for dropping into a
author
D'Arcy J.M. Cain
<darcy@druid.net>
Wed, 26 Feb 2003 13:16:50 +0000
(13:16 +0000)
committer
D'Arcy J.M. Cain
<darcy@druid.net>
Wed, 26 Feb 2003 13:16:50 +0000
(13:16 +0000)
query string. This fixes a bug where bool types sometimes returned with
a string that could not be dropped into a query.
src/interfaces/python/pg.py
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/python/pg.py
b/src/interfaces/python/pg.py
index 0e40a6e5a47db3f1f65cc387c4cac02dd48e82ba..5fd36eed3448e9b0898ad73ab48db7063009bd8b 100644
(file)
--- 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'"