aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2019-05-07 04:29:53 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2019-05-08 00:21:31 +0900
commit6a32e8aa72ebcbd587d7845cf354724bf2fffd7b (patch)
tree40ee791b9552b22957a040306d755012bc5ace0d /activerecord/lib/active_record/connection_adapters/postgresql
parentcecbc2340abec0ba96db9394f397f1e5a67c449d (diff)
downloadrails-6a32e8aa72ebcbd587d7845cf354724bf2fffd7b.tar.gz
rails-6a32e8aa72ebcbd587d7845cf354724bf2fffd7b.tar.bz2
rails-6a32e8aa72ebcbd587d7845cf354724bf2fffd7b.zip
Remove ignored_sql from SQLCounter by adding "TRANSACTION" to log name
This commit adds "TRANSACTION" to savepoint and commit, rollback statements because none of savepoint statements were removed by #36153 since they are not "SCHEMA" statements. Although, only savepoint statements can be labeled as "TRANSACTION" I think all of transaction related method should add this label. Follow up #36153
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb6
1 files changed, 3 insertions, 3 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 d872bd662f..45ec79ca78 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
@@ -145,7 +145,7 @@ module ActiveRecord
# Begins a transaction.
def begin_db_transaction
- execute "BEGIN"
+ execute("BEGIN", "TRANSACTION")
end
def begin_isolated_db_transaction(isolation)
@@ -155,12 +155,12 @@ module ActiveRecord
# Commits a transaction.
def commit_db_transaction
- execute "COMMIT"
+ execute("COMMIT", "TRANSACTION")
end
# Aborts a transaction.
def exec_rollback_db_transaction
- execute "ROLLBACK"
+ execute("ROLLBACK", "TRANSACTION")
end
private