• L
    PostgreSQL, Add input type casts for primitive types. · 9f2f2686
    Lars Kanis 提交于
    Ruby-pg's default way to serialize values for transmission to the database is to
    call #to_s . This however creates a temporary String object for each value.
    Setting a class based type map avoids the allocation of this additional String.
    
    The performance benefit is measurable in microbenchmarks, but not with
    the overhead of activerecord. However it's free to use and has no drawback.
    9f2f2686
postgresql_adapter.rb 30.2 KB