﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6184	encoding conversion breaks floating-point placeholders in raw PostgreSQL queries	Chris Chamberlin	nobody	"SVN revision 6903 rejects queries using floating-point values and placeholders:
{{{
>>> from django.db import connection
>>> c=connection.cursor()
>>> c.execute('SELECT * from my_table where floatfield > %f',[1])     # ints work fine
>>> c.execute('SELECT * from my_table where floatfield > %f',[0.1])
Traceback (most recent call last):
  File ""<stdin>"", line 1, in ?
  File ""django/db/backends/util.py"", line 18, in execute
  File ""django/db/backends/postgresql/base.py"", line 47, in execute
TypeError: float argument required
}}}

This is a regression from sometime between revision 4926 and 6903; sorry I can't be more specific.

The attached patch fixes this by modifying django.utils.encoding.smart_str() to really convert only instances of basestring when strings_only is true.
"		closed	Database layer (models, ORM)	dev		invalid			Accepted	1	0	0	1	0	0
