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:
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user