From 02128d628c4084eccd93c41db40f4d83db17f53c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 21 Oct 2010 11:27:28 -0700 Subject: setting the authorized session clears the statement cache --- activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index e785cc6fea..4792f824cf 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -391,6 +391,7 @@ module ActiveRecord # Set the authorized user for this session def session_auth=(user) + clear_cache! exec "SET SESSION AUTHORIZATION #{user}" end -- cgit v1.2.3