mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
Correct indenting in _quote() function.
Fix submitted by Andrew Kuchling <akuchlin@mems-exchange.org>
This commit is contained in:
parent
dcbbdb1b3e
commit
f9ae973c5e
@ -263,16 +263,16 @@ def _quote(x):
|
|||||||
x = "'" + string.replace(
|
x = "'" + string.replace(
|
||||||
string.replace(str(x), '\\', '\\\\'), "'", "''") + "'"
|
string.replace(str(x), '\\', '\\\\'), "'", "''") + "'"
|
||||||
|
|
||||||
elif type(x) in (types.IntType, types.LongType, types.FloatType):
|
elif type(x) in (types.IntType, types.LongType, types.FloatType):
|
||||||
pass
|
pass
|
||||||
elif x is None:
|
elif x is None:
|
||||||
x = 'NULL'
|
x = 'NULL'
|
||||||
elif hasattr(x, '__pg_repr__'):
|
elif hasattr(x, '__pg_repr__'):
|
||||||
x = x.__pg_repr__()
|
x = x.__pg_repr__()
|
||||||
else:
|
else:
|
||||||
raise InterfaceError, 'do not know how to handle type %s' % type(x)
|
raise InterfaceError, 'do not know how to handle type %s' % type(x)
|
||||||
|
|
||||||
return x
|
return x
|
||||||
|
|
||||||
def _quoteparams(s, params):
|
def _quoteparams(s, params):
|
||||||
if hasattr(params, 'has_key'):
|
if hasattr(params, 'has_key'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user