From c5989cc4837b5f814e14332a0b90a44dfa806b4e Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 24 Jan 2013 00:16:01 +0000 Subject: Fix PostgreSQL tests on Travis Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes. --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 5 +++++ 1 file changed, 5 insertions(+) (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 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 -- cgit v1.2.3