diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-11 07:20:28 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-11 07:23:00 +0900 |
commit | 10457475b9fe2ae9dc4e7f932fd6e561416c3881 (patch) | |
tree | 5d4365fc10667ea8b264c85d520ef9b726105e01 /activerecord/lib/active_record/connection_adapters/postgresql | |
parent | 07f0f1a8c7bcb3f789bb48bba7f4a485bfa317e9 (diff) | |
download | rails-10457475b9fe2ae9dc4e7f932fd6e561416c3881.tar.gz rails-10457475b9fe2ae9dc4e7f932fd6e561416c3881.tar.bz2 rails-10457475b9fe2ae9dc4e7f932fd6e561416c3881.zip |
An explain query does not raise the `ReadOnlyError` if preventing writes
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb index 0fd14fac0e..a0cac07491 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb @@ -67,7 +67,7 @@ module ActiveRecord end end - READ_QUERY = ActiveRecord::ConnectionAdapters::AbstractAdapter.build_read_query_regexp(:begin, :select, :set, :show, :savepoint, :rollback) # :nodoc: + READ_QUERY = ActiveRecord::ConnectionAdapters::AbstractAdapter.build_read_query_regexp(:begin, :explain, :select, :set, :show, :savepoint, :rollback) # :nodoc: private_constant :READ_QUERY def write_query?(sql) # :nodoc: |