diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:27:54 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:27:54 +0000 |
commit | 821f2d58a76da208b1f6851e436a3f1f9a00dbaa (patch) | |
tree | 442aa0a3244883e1995c7c2d9f07099ac5366730 /activerecord | |
parent | 8dfe5b78fa4525d2d3c6167e9aea29d7756b5eb7 (diff) | |
download | rails-821f2d58a76da208b1f6851e436a3f1f9a00dbaa.tar.gz rails-821f2d58a76da208b1f6851e436a3f1f9a00dbaa.tar.bz2 rails-821f2d58a76da208b1f6851e436a3f1f9a00dbaa.zip |
PostgreSQL: don't use async_exec and async_query with postgres-pr. Closes #7727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 093c1bc68d..5fcfe3b5e2 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* PostgreSQL: don't use async_exec and async_query with postgres-pr. #7727 [flowdelic] + * Fix has_many :through << with custom foreign keys. #6466, #7153 [naffis, Rich Collins] * Test DateTime native type in migrations, including an edge case with dates diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2f4b2b9a3a..1c469f44a1 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -55,7 +55,10 @@ module ActiveRecord def initialize(connection, logger, config = {}) super(connection, logger) @config = config - @async = config[:allow_concurrency] + + # Ignore async_exec and async_query with the postgres-pr client lib. + @async = config[:allow_concurrency] && @connection.respond_to(:async_exec) + configure_connection end |