Thanks for the suggestion. Agreed to handle multiple rows insert by implementing `supports_multi_insert?` method for each adapter. not bumping minimum requirement version to 3.8. The most biggest reason is still some active platform Ubuntu 12.04 LTS and OS X 10.9 Mavericks will be "unsupported" which installs SQLite 3.7.9 by default.
Here are `supports_multi_insert?` return values for each adapters. * SQLite: true if sqlite_version >= '3.7.11' https://www.sqlite.org/releaselog/3_7_11.html >> Enhance the INSERT syntax to allow multiple rows to be inserted via the VALUES clause. * MySQL: true Rails 5 requires MySQL 5.0 or higher, which supports multi row insert. Refer: https://github.com/rails/rails/pull/23458 https://dev.mysql.com/doc/refman/5.0/en/insert.html "13.2.5 INSERT Syntax" * PostgreSQL: true Rails 5 requires 9.1 or higher, which supports multi row insert. Refer: https://github.com/rails/rails/pull/23434 PostgreSQL 9.1 supports http://www.postgresql.org/docs/9.1/static/sql-insert.html I'm working on a pull request for this. Thanks, -- Yasuo Honda On Thursday, April 21, 2016 at 8:10:40 PM UTC-4, Jeremy Daer wrote: > > > On the other hand, it's pretty cheap/easy to support 3.7.x if we only do > multi-insert if the db supports it: > ```ruby > if connection.supports_multi_insert? > … > ``` > > Given that we've had multiple bug reports about it and how confusing it is > to troubleshoot, that's probably the friendlier choice. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
