diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-24 00:16:01 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-24 00:16:01 +0000 |
commit | c5989cc4837b5f814e14332a0b90a44dfa806b4e (patch) | |
tree | 9201cf1fa1f2a656c08a499ecb72e6ad7abea103 /activerecord/lib/active_record | |
parent | 8ac94d7c8938649984c683a51ee54589ee338166 (diff) | |
download | rails-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')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 5 |
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 |