Permalink
Browse files

Ignore "SHOW search_path" when counting PostgreSQL queries

  • Loading branch information...
1 parent 2c613f9 commit 5a350cdb9c69a1e1a302eb142a0284fd73d013e9 @amatsuda amatsuda committed Jan 18, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/test_case.rb
@@ -67,7 +67,7 @@ def clear_log; self.log = []; self.log_all = []; end
# 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

0 comments on commit 5a350cd

Please sign in to comment.