diff options
author | Akira Matsuda <ronnie@dio.jp> | 2013-01-18 18:59:22 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2013-01-22 05:24:23 +0900 |
commit | 5a350cdb9c69a1e1a302eb142a0284fd73d013e9 (patch) | |
tree | 2ea3aa1a55ceb0471b23629194073b84643d99c6 | |
parent | 2c613f9d370d5de9eef22d57ba0e6a796579df3f (diff) | |
download | rails-5a350cdb9c69a1e1a302eb142a0284fd73d013e9.tar.gz rails-5a350cdb9c69a1e1a302eb142a0284fd73d013e9.tar.bz2 rails-5a350cdb9c69a1e1a302eb142a0284fd73d013e9.zip |
Ignore "SHOW search_path" when counting PostgreSQL queries
-rw-r--r-- | activerecord/lib/active_record/test_case.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/test_case.rb b/activerecord/lib/active_record/test_case.rb index c035ad43a2..395872040b 100644 --- a/activerecord/lib/active_record/test_case.rb +++ b/activerecord/lib/active_record/test_case.rb @@ -67,7 +67,7 @@ module ActiveRecord # instead examining the SQL content. oracle_ignored = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO/, /^\s*select .* from all_triggers/im] mysql_ignored = [/^SHOW TABLES/i, /^SHOW FULL FIELDS/] - postgresql_ignored = [/^\s*select\b.*\bfrom\b.*pg_namespace\b/im, /^\s*select\b.*\battname\b.*\bfrom\b.*\bpg_attribute\b/im] + postgresql_ignored = [/^\s*select\b.*\bfrom\b.*pg_namespace\b/im, /^\s*select\b.*\battname\b.*\bfrom\b.*\bpg_attribute\b/im, /^SHOW search_path/i] [oracle_ignored, mysql_ignored, postgresql_ignored].each do |db_ignored_sql| ignored_sql.concat db_ignored_sql |