diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-01 16:10:27 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-01 16:10:27 +0900 |
commit | 5d3a0b14c0439beab8e3af946dec88fddc07f896 (patch) | |
tree | 09969a55a032a695593388f82826cbba29352ef8 /activerecord/lib/active_record/sanitization.rb | |
parent | 49a881e0db1ef64fcbae2b7ddccfd5ccea26ae01 (diff) | |
download | rails-5d3a0b14c0439beab8e3af946dec88fddc07f896.tar.gz rails-5d3a0b14c0439beab8e3af946dec88fddc07f896.tar.bz2 rails-5d3a0b14c0439beab8e3af946dec88fddc07f896.zip |
Pass `pk: false` to `connection.insert` explicitly if do not have a primary key
Because causing an extra query by `sql_for_insert` for guessing a
primary key.
https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb#L121-L125
Diffstat (limited to 'activerecord/lib/active_record/sanitization.rb')
0 files changed, 0 insertions, 0 deletions