Content-Length: 259284 | pFad | http://github.com/postgrespro/postgres/commit/9ff872a27233d5e02e55e9572a4b8161e0186cba

38 The quote function should return a string suitable for dropping into a · postgrespro/postgres@9ff872a · GitHub
Skip to content

Commit 9ff872a

Browse files
committed
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.
1 parent 8466680 commit 9ff872a

File tree

1 file changed

+1
-1
lines changed
  • src/interfaces/python

1 file changed

+1
-1
lines changed

src/interfaces/python/pg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _quote(d, t):
2929

3030
if t == 'bool':
3131
# Can't run upper() on these
32-
if d in (0, 1): return ('f', 't')[d]
32+
if d in (0, 1): return ("'f'", "'t'")[d]
3333

3434
if string.upper(d) in ['T', 'TRUE', 'Y', 'YES', '1', 'ON']:
3535
return "'t'"

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/9ff872a27233d5e02e55e9572a4b8161e0186cba

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy