Stop using the pg Float encoder

PG's type map assumes that all Ruby floats are going to a field with an
OID of type float4 or float8, and generates text which is invalid syntax
for other types. Since the gem can handle floats properly without this
encoder (albeit slightly slower), we can continue to use that as we have
in prior versions of Rails.

Fixes #27246
This commit is contained in:
Sean Griffin 2016-12-01 14:39:35 -05:00
parent 3dac36bd8e
commit 2204233165

@ -802,7 +802,6 @@ def add_pg_encoders
map[Integer] = PG::TextEncoder::Integer.new
map[TrueClass] = PG::TextEncoder::Boolean.new
map[FalseClass] = PG::TextEncoder::Boolean.new
map[Float] = PG::TextEncoder::Float.new
@connection.type_map_for_queries = map
end