aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-01-24 00:16:01 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2013-01-24 00:16:01 +0000
commitc5989cc4837b5f814e14332a0b90a44dfa806b4e (patch)
tree9201cf1fa1f2a656c08a499ecb72e6ad7abea103 /activerecord/lib/active_record/connection_adapters
parent8ac94d7c8938649984c683a51ee54589ee338166 (diff)
downloadrails-c5989cc4837b5f814e14332a0b90a44dfa806b4e.tar.gz
rails-c5989cc4837b5f814e14332a0b90a44dfa806b4e.tar.bz2
rails-c5989cc4837b5f814e14332a0b90a44dfa806b4e.zip
Fix PostgreSQL tests on Travis
Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 18a5b4b1e4..209553b26e 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -575,6 +575,11 @@ module ActiveRecord
true
end
+ # Range datatypes weren't introduced until PostgreSQL 9.2
+ def supports_ranges?
+ postgresql_version >= 90200
+ end
+
# Returns the configured supported identifier length supported by PostgreSQL
def table_alias_length
@table_alias_length ||= query('SHOW max_identifier_length', 'SCHEMA')[0][0].to_i