From ac681152051884c173486006089fc459cbf7128e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 10 Jul 2006 19:54:21 +0000 Subject: PostgreSQL: return array fields as strings. Closes #4664. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 ++ 1 file changed, 2 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 2fa357993f..94584a5ea4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -515,6 +515,8 @@ module ActiveRecord def translate_field_type(field_type) # Match the beginning of field_type since it may have a size constraint on the end. case field_type + # PostgreSQL array data types. + when /\[\]$/i then 'string' when /^timestamp/i then 'datetime' when /^real|^money/i then 'float' when /^interval/i then 'string' -- cgit v1.2.3